Question: PLEASE READ CAREFULLY 1) Suppose that three processes, P1, P2 and P3, are running in a multiprogramming environment. P1 executes for 10 units of time,
PLEASE READ CAREFULLY
1)Suppose that three processes, P1, P2 and P3, are running in a multiprogramming environment.
P1 executes for 10 units of time, waits on I/O for 10 units of time, and then processes for another 10 units.
P2 executes for 5 units of time, waits on I/O for 10 units of time, and then processes for 3 units of time.
P3 executes for 5 units of time, waits on I/O for 5 units of time, and then processes for 10 units of time.
What is the minimum amount of time needed to complete the processing of all the processes?
2)On early computers, every byte of data read or written was handled by the CPU. What implications does this have on multiprogramming?
3) Suppose that a multiprogrammed system has a load of N processes and that their individual total execution times are t1,t2, ,tN. How could it be possible for the total execution time of the N processes to be as small as the maximum of the individual processes execution times, maximum (t1, t2, , tN)?
4) Why is the storage capacity of main memory a factor that must be considered in determining the process maximum capacity in a multiprogramming environment?
5) Space-multiplexed sharing is the division of a resource into two or more distinct units and then the allocation of the individual units to processes. Time-multiplexed sharing is when one process can use the entire resource for a period of time and then another process uses it at a later time. Identify which of the following are examples of space-multiplexed sharing and which are time-multiplexed sharing. If the example could be either strategy, explain.
The cable internet service in a residential neighborhood
A personal computer
A whiteboard in a classroom
A bench seat in a park
A patient room in a doctors office
A printer on a timesharing system
6) When an interrupt or a system call transfers control to the operating system, a kernel stack area separate from the stack of the interrupted process is generally used. Why?
7) How is the modular kernel approach similar to the layered approach?
8) Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPUs execution load.
How does the CPU interface with the device to coordinate the transfer?
How does the CPU know when the memory operations are complete?
In systems that include DMA module, DMA access to main memory is given higher priority than processor access to main memory. Why?
9) Suppose that an operating system had the following nine states:
| State | Description |
| User Running | Executing in user mode. |
| Kernel Running | Executing in kernel mode. |
| Ready (to Run, In Memory) | Ready to run as soon as the kernel schedules it. |
| Blocked (Asleep in Memory) | Unable to execute until an event occurs; process is in main memory (a blocked state). |
| Ready to Run, Swapped | Process is ready to run, but the swapper must swap the process into main memory before the kernel can schedule it to execute. |
| Sleeping, Swapped | The process is awaiting an event and has been swapped to secondary storage ( a blocked state). |
| Preempted | Process is returning from kernel to user mode, but the kernel preempts its and does a process switch to schedule another process. |
| Created | Process is newly created and not ready to run. |
| Zombie | Process no longer exists |
Draw a state diagram to represent a process with these states.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
