Question: 1. If each process uses its complete time slice in the machine, what fraction of the machines time is spent actually performing processes? What would
1. If each process uses its complete time slice in the machine, what fraction of the machine’s time is spent actually performing processes? What would this fraction be if each process executed an I/O request after only a microsecond of its time slice?
2. Suppose process A and process B are sharing time on the same machine, and each needs the same non-shareable resource for short periods of time. (For example, each process may be printing a series of independent, short reports.) Each process may then repeatedly acquire the resource, release it, and later request it again. What is a drawback to controlling access to the resource in the following manner:
Begin by assigning a flag the value 0. If process A requests the resource and the flag is 0, grant the request. Otherwise, make process A wait. If process B requests the resource and the flag is 1, grant the request. Otherwise, make process B wait. Each time process A finishes with the resource, change the flag to 1. Each time process B finishes with the resource, change the flag to 0.
Step by Step Solution
3.40 Rating (162 Votes )
There are 3 Steps involved in it
if each process uses its complete time slice in the machine in Questio... View full answer
Get step-by-step solutions from verified subject matter experts
