Assignment-1
Assignment-1
3. In what ways is the modular kernel approach similar to the layered approach?
In what ways does it differ from the layered approach?
4. Including the initial parent process, how many processes are created by the
program shown in figure below?
#include<stdio.h>
#include<unistd.h>
int main()
{ /* fork a child process */
fork();
/* fork another child process */
fork();
/* and fork another */
fork();
return 0;
}
5. Describe the differences among short-term, medium-term, and long-term
scheduling.
6. Explain process control block with a neat diagram.
7. What are Race conditions? Explain the use of semaphores to achieve
synchronization in producer-consumer problems.
8. Write short notes on monitors and semaphores.
9. Consider the following set of processes, with the length of the CPU burst time
given in milliseconds:
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all
at time 0.
i. Draw the Gantt charts that illustrate the execution of these
processes using the following scheduling algorithms: FCFS,
Preemptive-SJF{Arival time P1-1,P2-0,(P3,P5)-2,p4-4}, non-
preemptive priority (a larger priority number implies a higher
priority), and RR (quantum = 2).
ii. What is the turnaround time of each process for each of the
scheduling algorithms in part a?
iii. What is the waiting time of each process for each of these
scheduling algorithms?
iv. Which among the algorithms results in the minimum average
waiting time (over all processes)?
10. Consider the following snapshot of a system.