Midterm Answer
Midterm Answer
Answer each question (or sub-question) with a phrase or no more than one sentence in the space provided. Additional sentences will not be read. 1. (10%) Layered structure is a system structuring principle based on the ___vertical___ partitioning of the system such that each layer in the system strictly adhere to three basic requirements: ___well-defined functionalities____, ____clear interface____, and ____1-in-1-out structure_______ to facilitate easy _composition/decomposition___ of a large system. 2. (10%) Processes (or entities) in a distributed system can only interact with each other through message passing, and message passing incurs non-negligible communication delay. This fact causes great difficulties (or challenges) in the design of a distributed system. Name two most fundamental ones: ___difficult to obtain global state information_______________________ ___difficult to maintain the consistency and coherency of data ________
3. (10%) Indicate True or False for the following statements: (T/F) _ F__ The majority of the file system functionalities should reside in the kernel. (T/F) _T__ The combination of segmentation and demand paging is commonly employed in an operating system to achieve a virtual memory system. (T/F) _T___ Location-independence is a stronger requirement than location-transparency. (T/F) _F___ UDP is a connection-less protocol at the network layer. (T/F) _T___ Threads within a process are not protected from one another.
4. (10%) User-space implementation of threads has the advantage of __portability____ while kernel-space implementation of threads has the advantage of __efficiency___. An example of per-process state information is _____opened files_____ and an example of per-thread state information is _____stack registers_______. What assumption was used with respect to thread creation in your project 2? Is it per-client or per-request? ____per client________.
5. (10%) A sample of event is taken at each process site to form a snapshot of a three-node distributed system. Event a at node 1 has a vector logical clock of <3,3,0>. Event b at node 2 has <0,1,0> and event c at node 3 has <0,2,2>. Show the causality (or non-causality) between the events: ___b a___, _b c___, __a ~ c__. Does this snapshot represent a consistent state of the system? Why? __a received a message that was never sent by b_________, ____c received a message that was never sent by b_________.
6. (10%) Indicate True or False for the following statements: (T/F) __F__ The P and V operations in semaphore correspond exactly to the wait and signal operations in monitor respectively. (T/F) __T__ In the class, we show that we can implement monitor by using semaphore. It is also true that we can implement semaphore by using monitor. (T/F) __T___ Java support mutual exclusion and condition coordination just like monitor. However, the concept of variable in monitor is replaced by the concept of object in Java. (T/F) __T___ Starvation can occur in both reader-preference and writer-preference problems. However, it is less critical for the write-preference problem. (T/F) __F___ Message passing synchronization can be achieved without any sharing between communicating processes.
7. (10%) LINDA requires only a very small set of primitives: in, our, rd, and eval. Although it has many interesting features, it has limitations too. Indicate whether the followings are true/false. (T/F) __T___ It is a highly transparent system since it is fully decoupled from the underlying programming language and computing platform (operating system and hardware). (T/F) __T___ The in() operation is non-deterministic and highly resemble a lookup() operation, which is very essential and common operation for many modern web-based applications. (T/F) __T___ Since in() is blocking and out() is non-blocking, mutual exclusion through asynchronous message passing is trivial. (T/F) __F___ Synchronization with respect to condition coordination is also transparent and trivial in LINDA. (T/F) __F___ It supports ADA type of rendezvous. 8. (10%) Five processes in a multicast group have their sequence vectors: p1= <4,3,2,3,4>, p2=<4,3,1,3,3>, p3=<4,3,2,3,5>, p4=<3,2,1,4,5>, and p5=<4,3,2,3,5> at a certain instance of time. Next, p1 broadcasts a message to the group. To maintain causal order multicast, each process needs to decide whether to accept (deliver), delay (buffer), or reject (drop) the message. State the correct action for each process: p2: __delay_____, p3: ___accept___, p4: __delay__, p5: __accept__. The sequence vectors used in the causal order multicast are not quite the same as the logical time vectors (vector logical clock). Show a difference in a simple sentence: ___ Sequence vectors are specific to particular events only and they are consecutive, thus they are a special case of vector logical clocks ___. 9. (20%) Circle your answer for each pair of (xxx/yyy) in this question. The RPC in the context of client/server model as described in our class is (asynchronous/synchronous) communication based on (process/procedure) naming where the server is (passive/active). It hides the communication and effectively achieves (concurrency/access) transparency. The transparency is implemented through the use of (stub/binder) processes. However, (exceptions/failures) are hard to make transparent. The exponential key exchange in SUNs secure RPC establishes a (communication-channel/shared-secret) between client and server based on the intractability of the discrete (exponential/logarithm) algorithm. RMI is an extension of RPC with an added (object/service) model/concept and support of (communication/synchronization).