OS ASS 1,2&3
OS ASS 1,2&3
Date :
What is scheduling? What is scheduler Explain the types of schedulers. R,U NC209.2
What are various criteria for a good process scheduling algorithm?
Draw and explain five state process state transition diagrams in detail R,U NC209.2
Draw and explain Seven state process state transition diagram in detail R,U NC209.2
Mr. Bhavesh D.
Ms.Jigisha Patel Dr. Piyush S. Jain
Patel HOD,
Assistant Professor, Principal, SNPIT&RC,
Computer Scienceand
Computer Science and Umrakh
Engg.
Engg.
ASSIGNMENT
Date :
All process arrived in order p1, p2, p3, p4 all time zero.
(1) Draw gantt charts illustrating execution of these processes for SJF and
round robin (quantum=1)
(2) Calculate waiting time for each process for each scheduling algorithm
(3) Calculate average waiting time for each scheduling algorithm
2. Explain any two preemptive scheduling algorithms in brief. What is R,A NC209.3
meant priority inversion?
3. What is the criterion used to select the time quantum in case of round- R,U NC209.3
robin scheduling algorithm? Explain it with a suitable example.
4. Solve following example by FCFS and SJF CPU scheduling R,U NC209.3
estimated running times 10, 6, 3, 4 and 8 ms. For each of the following
algorithm determine mean process turnaround time. Consider process
swapping overhead is 1 ms.
1) FCFS
2) Round-Robin (Time quantum = 2 ms)
12.Five batch jobs P1, P2, P3, P4 and P5 arrive at 0, 1, 2, 3 and 4 ms. They R,U NC209.3
have estimated running times 14, 12, 8, 3 and 6 ms. Their priorities are
3, 5, 2, 1 and 4 respectively with 5 being highest priority. For each of
the following algorithm determine mean process turnaround time.
Consider process swapping overhead is 0.5 ms.
1) SJF (Non-preemptive)
2) Priority Scheduling (Preemptive)
13.For the following set of process find the avg waiting time and avg turn R,U NC209.3
around using GANTT chart for
a. FCFS b. SJF(primitive and non primitive) c. RR d.Priority e.SJRT
14.Following table gives arrival time and expected run time of five R,U NC209.3
processes.
Ignore process switching overhead. Find average turnaround time for
following scheduling algorithm. Ignore process switching overhead. Find
average turnaround time for following scheduling algorithm.
1. Round robin (quantum = 1 sec)
2. Shortest Job First.
15.Differentiate between preemptive and non-preemptive scheduling. Solve R,U NC209.3
following by SJF preemptive and non-preemptive.
Draw Gantt Chart, Average Waiting Time and Average Turnaround Time.
Which one is better as per average turnaround time?
16.Consider the following five processes with the length of the CPU burst R,U NC209.3
time in milliseconds
Processes are Assumed to have arrived at time 0. For the above set of
processes find the average waiting time and average around time for each of
the following scheduling algorithm using Gantt chart. Consider 1 is highest
priority.
1. SJF 2. Non preemptive Priority 3. RR ( Q = 2)
17.Find average waiting time for Shortest job first scheduling, and Round R,U NC209.3
robin scheduling algorithm. CPU burst time is given in millisecond and
time quantum is 4.
18.Consider the following set of processes with the length of CPU burst R,U NC209.3
time given in the milliseconds. Calculate average turnaround time and
average waiting time for First-come first served scheduling, Shortest job
first scheduling and Priority scheduling algorithm.
19.Consider the Following set of Processes , with the length of the CPU- R,U NC209.3
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5 all
at time=0.
21.For the following set of process find the avg waiting time and avg turn R,U NC209.3
around using GANTT chart a. FCFS b. SJF
Give the key difference between a mutex and a binary semaphore. R,U NC209.3
Explain Dining philosopher problem and its solution using semaphore. R,U NC209.3
What is semaphore? Explain its implementation as wait and signal for providing R,U NC209.3
process synchronization?