Potpourri_3b Potpourri The context for this question is the…

Potpourri_3b Potpourri The context for this question is the same as the previous question: 3.  Recall that locks require respective atomic operations (e.g., naive spin lock uses test_&_set; ticket lock and array-based lock use fetch_&_inc; linked-list lock uses fetch&store and compare_&_swap).  In a multiprocessor system with hardware cache coherence, multiple cores keep cached copies of data consistent by invalidating or updating caches on writes. This design makes certain locks “noisier” than others—i.e., they produce more cache coherence (invalidation) traffic under contention.  b. True or False with justification. A ticket lock is often noisier than a queue-based lock (either an array-based lock or a linked-list lock) under heavy contention.

Potpourri_2a Potpourri 2. [8 points] Answer the following…

Potpourri_2a Potpourri 2. Answer the following questions with reference to Xen’s I/O ring data structure. The I/O ring is a circular buffer used by Guest Operating systems for enqueuing requests for the Hypervisor, and collecting its responses. a. You wish to improve I/O ring design by providing APIs in the guest OS to throttle the request creation. Assume the Guest OS needs just the number of outstanding requests to decide if it should throttle the requests. Is it possible to get this number of outstanding requests in the current implementation? Why or why not?

Parallel_Systems_1a Shared Memory Machines 1. [6 points] a….

Parallel_Systems_1a Shared Memory Machines 1. a. You are trying to explain the principles of sequential consistency and cache coherence to your friend. Your friend claims that cache coherence implies sequential consistency. Do you agree with your friend’s claim? If not, state how you will convince your friend that they are not the same. 

Parallel_Systems_3b M.E.Lock The context for this question i…

Parallel_Systems_3b M.E.Lock The context for this question is the same as the previous question: The Linux kernel historically used a ticket spin lock on multiprocessor systems. In 2016, Linux patch introduced a “qspinlock”, which is a “hybrid” design drawing inspiration from queue-based locks (MCS) and the old ticket lock.  “qspinlock” is built based on a linked-list lock. However, the first spinner (next-in-line thread) spins on a lock bit instead of carrying a node structure from lock to unlock. When more contenting thread arrives, the first spinner pays the overhead to revert back to spin on the node structure and queues additional threads in a linked list. b. Describe a scenario when either a ticket lock or a pure queue-based lock may outperform qspinlock. Explain why.