advantage is that most solutions are based on busy waiting, i.e. a process needs to keep ... object is unlocked and notifyAll for notifying any threads at the waiting queue that the object is ...... proposal, required a price to pay. As explained in
local area network (LAN). A DFS is implemented as part of the operating system of each of the connected computers. This paper establishes a viewpoint that ...
1. 1. CIS 505: Software Systems. Introduction to Distributed Systems. Insup Lee.
Department of Computer and Information Science. University of Pennsylvania.
Albert Benveniste. Stefan Haar. Claude Jard. â . 21st September 2004. Abstract. In this paper ... Corresponding author for this paper: [email protected],.
software engineering, and to show its use in software architecture design. We do this by ... made up of layers of concurrent control modules installed on a distributed computer architecture, by .... robots, which initialize the SensorManager and assi
Akka. Building Distributed Systems for. Concurrent, Fault-tolerant and Scalable
Java Applications. 1. 1. Thursday, November 21, 13 ...
Nov 12, 2007 - What is the structure and origin of the Milky Way galaxy? ... Good tracer of galactic ..... Uses a declarative Entity Specification Language (ESL).
the goal of both simplifying the development of concurrent and distributed complex systems and guarantying an efficient execution of applications. ActoDes is ...
Continuing earlier work implementing CORBA compatible interaction abstractions [CD97], we intend to write a backend to the CORBA IDL compiler that ...
Aimed primarily at undergraduate and graduate students in concurrent and distributed computing courses, Concurrent and Distributed Computing in Java by ...
Luciano Bononi, Michele Bracuto, Gabriele D'Angelo, Lorenzo Donatiello. Dipartimento di ... in the system architecture supporting the parallel or distributed simulation. ..... The results confirm the expectations: for a number of concurrent runs ...
anchor in the rectus fascia, the mesentery, and in different structures of the pelvic floor ... Size matters but shape is paramount. ⢠The PelFix anchor demonstrates ...
CS 213. Introduction to Computer Systems. Page 1 of 4. Distributed and Parallel
Systems. We have discussed the abstractions and implementations that make ...
4 Trends in Distributed Systems: Resuming & Foreseeing. Andrea Omicini ... [
Coulouris et al., 2012]) according to the personal view of the teacher of this
course.
Security Engineering: A Guide to Building Dependable Distributed Systems. 115
... access controls can be used to manage which principals can perform which .....
As you read through this book, you'll see that many other applications, from
burgl
Course Textbook George Coulouris, Jean Dollimore and Tim. Kindberg,
Distributed Systems: Concepts and Design. ▻ 4th Edition: http://www.cdk4.net/.
In this chapter, we discuss the general structure of distributed systems and the
networks that ... Load balancing and load sharing are discussed by [Harchol-
Balter and ... D. Comer, Internetworking with TCP/IP, Volume II, Third Edition,.
Prentice
Add these different types of examples to your next presentation. ⢠Metaphor / analogy. ⢠Illustration. ⢠Case Stud
Distributed Computing Systems. 2. The Rise of Distributed Systems ... Definition:
a distributed system is. ▫ A collection of ... DOS (Distributed Operating Systems).
grammer to write asynchronous code in a sequential manner, producing code ..... Figure 2.1 shows an example with three processes {p, q, r} and six events. {e1,eâ² ..... Netcharts are distributed versions of HMSCs that have the structure of a .... gu
systematic approach to the design and development of complex engineering systems [1]. .... On the whole system dimension, SE applies a top-down, bottom up ...
This research was carried out as part of the EU FP6 project Credo: Modeling and analysis of evolutionary structures for distributed services (IST-33826).
and business-to-business (B2B) applications usually involve invocations of ... M. Alrifai, W.-T. Balke and W. Nejdl are with the L3S Research Center,. University of ... account (account A) through two subsequent calls to the deposit and withdraw.
Describe three types of concurrency which can occur on a single CPU. Q3. Why
is writing a ... A concurrent program has six threads and seven resources. Each.
CONCURRENT AND DISTRIBUTED SYSTEMS Examples Sheet This course is split into two halves. The first eight lectures appear in Michaelmas Term, and the second eight lectures appear in the Lent Term. The Course Lecturer recommends that a total of four supervisions are offered for this course, two for each half. Relevant exam questions for this course can be found in many different locations, including: Concurrent Systems, Concurrent Systems and Applications, Concurrent and Distributed Systems and Operating Systems Foundations. Not all of these questions cover topics which are part of the current syllabus. In particular, the Concurrent Systems and Applications course also contains a lot of Java-related material which is now taught separately in the Further Java course. A list of relevant past exam questions is listed in Appendix A.
1
Part One Supervision 1 Q1. What’s the difference between a process and a thread in an operating system? Q2. Describe three types of concurrency which can occur on a single CPU. Q3. Why is writing a concurrent program hard? Q4. In the user-level threading model, why does pre-emption by the operating system (e.g. due to a system call) necessarily halt the execution of all threads? Q5. The precise error demonstrated in Slide 17 of the notes can be solved by adding the following additional check: beer = checkFridge(); if (!beer) { if (!note) { if (!beer) { note = 1; buyBeer(); note = 0; } } }
Describe why this solves the problematic context switch suggested on Slide 17. Give an example of a new location for a context switch for the above example which results in concurrent purchase of beer by two flatmates. Q6. What does it mean for an operation to be atomic? Which operations in Java are guaranteed to be atomic (Hint: search for Java Language Spec and read the relevant section of the book you come across)? Q7. Describe how you would use the semaphore mechanism to control workers in a beer factory. Worker 1 makes the bottles and places them on a table with a capacity to hold up to 10 bottles. Worker 2 takes bottles from the table and fills them with beer. 2
Q8. What’s the difference between a mutual exclusion lock and a semaphore which is initially set to one? Q9. Does the solution presented in Slide 31 work? Q10. Describe a solution to the Producer-Consumer Problem which allows concurrent access to the buffer by one producer and one consumer when you have multiple producers and multiple consumers vying for access. E1. Write answers to the following exam questions: • 2005 Paper 5 Question 4 • 2004 Paper 4 Question 8 Supervision 2 Q11. A concurrent program has six threads and seven resources. Each resource has a lock associated with it to ensure only one thread can access it at a time. Threads either hold the lock for a resource (L), are blocked waiting to acquire a resource (B) or are currently not interested in the resource (X). The current state of execution of the program is described in the table below, where each column represents a resource, and each row represents a thread: T1 T2 T3 T4 T5 T6
L X X X X X
B L X X X X
X X X L X B
X X X X B L
X X X L X X
X X X X L X
L B B X X X
Write down the threads which are in deadlock and describe why this is the case. What is the minimum number of threads you need to terminate in order to ensure the program is no longer deadlocked? Q12. A student has implemented a demo bank system in Java as shown in Appendix B. 3
a) Run his program. b) Explain why, despite the fact he has added locking to the BankAccount class, his program still produces erroneous results. c) Copy his source code into a new class called ConsumerWithLocks and, by using a global lock on the consumer object, ensure his program runs correctly. d) Copy his source code into a new class called ConsumerWith2PL and, by taking out locks on the BankAccount objects, implement Strict Two-Phase Locking. e) Describe why implementing a solution based on Time Stamp Ordering is difficult write in Java. E2. Write answers to the following exam questions: • 2001 Paper 3 Question 1 • 2000 Paper 4 Question 1 Additional Questions Q13. It is possible to build mutual exclusion using event counts and sequencers (see Handout 2, slide 4) - is it possible to build a traditional (counting) semaphore? How? Q14. Sketch a solution to the multiple-reader single-writer (MRSW) using Java monitors. Q15. What are the principal differences between traditional transactions (as implemented by databases) and software transactional memory?
4
Part Two Supervision 3 TODO Supervision 4 TODO
5
Appendix A A list of exam questions which cover topics still on the current course syllabus are listed below. • 1998 Paper 11 Question 6 • 1999 Paper 3 Question 1 [ignore “scheduler activations”] • 2001 Paper 3 Question 1 • 2000 Paper 3 Question 1 • 2000 Paper 4 Question 1 • 2005 Paper 5 Question 4 • 2004 Paper 4 Question 8 • 2008 Paper 11 Question 9 • 2010 Paper 5 Question 4 TODO: this list is rather incomplete
6
Appendix B public class Customer { class BankAccount { private int balance; BankAccount(int initialBalance) { balance = initialBalance; } synchronized int getBalance() { return balance; } synchronized void credit(int amount) { balance = balance + amount; } synchronized void debit(int amount) { balance = balance - amount; } } final BankAccount savings = new BankAccount(1000); final BankAccount current = new BankAccount(100); int getTotalBalance() { return savings.getBalance() + current.getBalance(); } void transferFromSavings(int value) { current.credit(value); savings.debit(value); } void transferToSavings(int value) { savings.credit(value); current.debit(value); } public static void main(String[] args) { final Customer customer = new Customer(); new Thread(){
7
public void run() { while(true) { int assets = customer.getTotalBalance(); if (assets != 1100) { System.out.println("Assets are:" + assets); } } } }.start(); while(true) { customer.transferFromSavings(100); customer.transferToSavings(100); } } }