This document contains 38 test questions covering topics in concurrent and distributed systems for a mid-semester quiz. The questions are grouped into 7 sections: 1) Basic Concurrency, 2) Mutual Exclusion, 3) Condition Synchronization, 4) Non-Determinism, 5) Scheduling, 6) Safety and Liveness, and 7) Architectures. The document provides feedback to students on their understanding of the course material to date and encourages reviewing topics that questions were not able to be answered for.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
18 views2 pages
Mid Semester Quiz.05
This document contains 38 test questions covering topics in concurrent and distributed systems for a mid-semester quiz. The questions are grouped into 7 sections: 1) Basic Concurrency, 2) Mutual Exclusion, 3) Condition Synchronization, 4) Non-Determinism, 5) Scheduling, 6) Safety and Liveness, and 7) Architectures. The document provides feedback to students on their understanding of the course material to date and encourages reviewing topics that questions were not able to be answered for.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Test Questions for
Concurrent and Distributed Systems 2005
Mid-Semester Quiz ☞ to all students of ANU/FEIT/DCS/COMP2310
General 2. Mutual Exclusion
The questions below do not cover the whole of the ma- (7) When do you need mutual exclusion? terial of the course up to the mid-semester break, but (8) What are the minimal requirements to be able to are meant to give you feedback about your perform- implement mutual exclusion between two tasks? / more than two tasks? ance. Do this quiz as soon as you can – do not put it on (9) The most simple algorithms implementing mutual the stack until just before the final exam (it will be too exclusion between two tasks are Decker’s and Pe- late to catch up then). If you can go through all of those terson’s algorithm. Describe both of them and de- questions and can answer them based on a solid un- termine what the do differently, but still achieving derstanding of the material, you are on the right track, the same goal. and should keep going. If you are hesitant or even lost (10) Specify a semaphore. with some of those questions: start reading again (your (11) Is a binary semaphore sufficient to implement all lecture notes (it should be all there), and the text forms of semaphores? / all forms condition synchro- books), talk with your fellow students (maybe you nization? Why? missed just the lecture, when this material was pre- (12) Give examples of specific, realistic hardware-sup- sented), talk with the tutors, or talk to one of the lectur- port in the implementation mutual exclusion. ers of the course, until you gained enough confidence. (13) Sketch a simple method to implement mutual ex- To make sure that your confidence is not an illusion: clusion between two tasks based on atomic access to shared variables / or based on semaphores. exchange your answers with your fellow students, and post critical ones to the phorum (but please only criti- (14) What is the difference between starvation and a livelock? cal ones). It still doesn’t necessarily mean that the an- swers are correct, but we will interfere on the phorum, 3. Condition Synchronization if you’re thinking in a wrong direction. We will re- (15) When would you chose which kind of synchroniza- spond to your questions and postings (if we have the tion method (assuming you have a free choice in impression that you worked through the material in the your specific development environment)? Give rea- sons. first place), but we will not supply an example solu- tion. Some questions don’t have a single, unique an- (16) Which potential problem arises, when you try to suspend a process on a condition variable inside a swer, but are meant to make you think for a little while. monitor routine? How could you solve this prob- lem? 1. Basic Concurrency (17) Does it makes sense, or is it even necessary to re- (1) When does concurrency not make sense? lease multiple processes, which are waiting at a condition variable at once, when some other proc- (2) Specify a process ess signals this condition. (3) Specify a thread (18) Are there any differences between a semaphore and (4) What are the differences between a user-level a condition variable? thread and a kernel-level-thread (19) Can you call another monitor-routine from within a monitor-routine? (5) Could you sketch all possible process states and (20) Why are multiple processes allowed at once inside their transitions? a protected function? (6) Which programming paradigms are more suitable (21) Can you emulate synchronous message passing by for concurrent systems, which are less suitable? asynchronous message passing? If so: how close Which are intrinsically concurrent? can such an emulation come? Chapter: Non-Determinism 2
4. Non-Determinism 6. Safety and Liveness
(22) If you have a client-server system at hand, where (28) What is the rationale behind linear waiting?, i.e. the server uses a non-deterministic select statement why isn’t the much easier FIFO scheme always used to offer several different services to the clients and instead? you would like to change this part of the server into (29) Is there a deadlock-safe synchronization scheme? a deterministic program: what would you need to (30) Which of the deadlock conditions can you break change? - and can you do this without losing any the easiest? – and in which kinds of environments? functionality? (31) How can you break/prevent the circular-wait dead- lock condition? 5. Scheduling (32) What are the minimal requirements which need to (23) Which scheduling scheme (or combinations of be fulfilled if you plan to apply deadlock avoid- them) would you prefer to have on your own com- ance? puter? Give reasons. (33) What does it mean that a system fails ‘uncon- (24) Assuming that you have only one processor in your trolled’? system, and one of the user-tasks is currently exe- cuting: How can/will the scheduler gain control n 7. Architectures order to suspend the current task? (If a user-task is (34) What are the differences between a multi-tasking, a currently executing, it also means that the scheduler multi-programming, and a multiprocessor system? (or any other part of the OS) is currently not run- (35) UNIX systems come in many different flavours and ning, right?). architectures. Name some common features. (25) In order to come up with a good scheduling system, (36) What are the drawbacks of a fork-style process cre- you need to include as much knowledge as you can ation? What are the advantages? get about your tasks. What do you know (or can you (37) File-oriented interfaces are the standard in UNIX. extract) about the tasks in a standard desktop-oper- Give examples for forms of communication / data- ating system? exchange where file-oriented interfaces are not ade- quate. (26) Why is Fixed Priority Scheduling often preferred over Earliest Deadline First scheduling? (38) Why are micro-kernel operating systems more sup- portive for distribution (of the operating system it- (27) What is the difference between a utilization test and self) than most other of operating systems a response time analysis? architectures?