Question: Question 5 [ 2 0 Marks ] Message buffers and message queues can be eliminated if processes exchange messages by rendezvous. In this scheme, a

Question 5[20 Marks]
Message buffers and message queues can be eliminated if processes exchange messages by rendezvous. In this scheme, a sender tries to find whether an intended receiver is waiting for its message. If so, it copies the message to the receiver's address space and unblocks the receiver. If not, it waits. When the receiver runs, it tries to find a waiting sender which has message for it. If so, it copies the message and unblocks the sender. Otherwise, it waits.
a) Prove that, in a uniprocessor kernel, both sender and receiver wait for each other cannot occur.
[10]
b) In a multiprocessor kernel, processes may run on separate processors in parallel. Can process rendezvous still work? Justify your answer.
Question 6[20 Marks]
Device a memory compaction algorithm for the real mode MTX kernel. In kmalloc(), if there is not enough memory and there are multiple holes, move all the process images to the high end of memory and try to allocate memory again. Note that, if a process image is moved, its saved segment registers in both the proc and user mode stack must be adjusted to suit the new segments.
Question 7[20 Marks]
Assume P1 is a process which hops from segment to segment. Initially, P1 runs in the segment \(0\times 2000\). By a hop (u16 segment) syscall, it enters kernel to change segment. When it returns to Umode, it returns to an IDENTICAL Umode image but in a different segment, e.g.\(0\times 4000\). When P1 tries to change its Umode segment, the target segment may already be occupied by another process. If so, the original process must be evicted to make room for P1.
Devise an algorithm for the hop() syscall. In your algorithm, devise a technique that would allow P1 to move into a segment without destroying the original process in that segment.
Question 5 [ 2 0 Marks ] Message buffers and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!