552.ICE0124 OS July-Dec, Assignment 22
552.ICE0124 OS July-Dec, Assignment 22
QUESTION 1
a) Distinguish between Preemptive and Non-preemptive Scheduling (4 Marks)
b) Describe the following scheduling algorithms
• Non Pre-Emptive, First Come, First Serve
• Round Robin
• Shortest Job First (6 Marks)
c) Given the following processes and burst times
Process Burst Time
P1 10
P2 6
P3 23
P4 9
P5 31
P6 3
P7 19
Calculate the average wait time when each of the above (Q1:b) scheduling algorithms
is used? Assume that a quantum of 8ms is being used. (15 Marks)
(Total =25 Marks)
QUESTION 2
a) What is the difference between the dispatcher and the short term scheduler? (5 Marks)
b) Explain what the following commands can achieve:
i) cd.. ii) Copy Con 1 iii) MD power iv) DIR /P v) RD power. (10 Marks)
c) Explain what the producer consumer problem is? Give an example of its occurrence in
operating. (10 Marks)
(Total =25 Marks)
QUESTION 3
A set of processes is deadlocked if each process in the set is waiting for a resource that
the other process in the set is holding. Because all the processes are waiting for a
resource, none of them will ever release what they are using and they continue holding
to the resources while other processes also continue to wait for resources for forever.
Required:
a) Describe the techniques that are suitable for handling deadlocks. (12 Marks)
b) State the necessary and sufficient circumstances that would promote deadlocks to
occur. (13 Marks)
(Total =25 Marks)
QUESTION 4
a) A thread is a single sequence stream within a process. In a process, threads
allow multiple executions of streams thereby promoting multi-processing. Nevertheless,
they are not free from limitations.
i) Provide the demerits of kernel-level threads.
ii) State reasons why Operating System designers like Microsoft use threads to
design the OS. (12 Marks)
b) When a process finishes running its resources are returned to the system and it is
purged from any system lists or tables. The Process’ control block (PCB) is erased i.e.,
the PCB's memory space is returned to a free memory pool.
ASSIGNMENT JULY-DEC 2022
i) Give the reasons why a new process would terminate the process that is
currently running.
ii) With a brief explanation, provide a series of discrete process stages that a
process goes through. (13 Marks)
(Total =25 Marks)
QUESTION 5
Consider the following set of processes with their arrival and burst times as shown
Process Arrival Time Burst Time(ms)
P1 0 4
P2 1 2
P3 2 5
P4 3 4
Find the Average Waiting Time, Average Turnaround Time and Response Time using
GANTT Chart for:
a) FCFS (7 Marks)
b) SJF preemptive. (8 Marks)
c) SJF non-preemptive. (8 Marks)
d) Which algorithm will be the most appropriate, justify your answer. (2 Marks)
(Total =25 Marks)
School:………………………………………………
Degree Programme:…………………………………….
Course name and Code…….……………..…………….
Assignment No.(1)