You are on page 1of 4

Virtual University of Pakistan

Department of Management (MPA)

Assignment # 02

Subject: Introduction to computing (CS-101)

Submitted To: Dr. M. Tanvir Afzal

Submitted By: Salman Khan

Student ID: mc210202853

Session: Spring 2021

Question
There are 4 processes A, B, C, and D in the ready queue for execution.

Process Total CPU Time

Process A 4ms

Process B 6ms

Process C 4ms

Process D 8ms

The processes enter in the ready queue in the sequence B, D, A, and C and are picked by the dispatcher in the
same order. Value of Time Slice is 2ms. The dispatcher picks a process from Ready Queue and sends it to the
processor for execution.

Task: 01
Draw the ready queue for the above given processes.

Solution

C A D B Dispatcher

CPU

Task: 02
Draw the step-wise pictorial diagram of the above given scenario in the context of
multiprogramming.
Solution

4MS
4MS 8MS 6MS

C A D B

2MS 2MS 2MS 2MS

2MS 2MS 6MS 4MS

C A D B

2MS 2MS 2MS 2MS

0MS 0MS 4MS 2MS

C A D B

Finish Finish 2MS 2MS

0MS 0MS 2MS 0MS

C A D B

Finish Finish 2MS Finish


0MS 0MS OMS 0SM

C A D B

Finish Finish Finish Finish

End

You might also like