You are on page 1of 5

COMSATS University Islamabad

Department of Computer Science

Terminal Examination, SPRING 2021

Class: - BSCS/BSSE-4
Marks: - 15
Subject: - Operating Systems Concepts/Operating Systems
Time: - 30 Minuets
Dated: - June 29, 2021
FA18-BSE-120
Shahzaib Hassan

============= Question No.1 (Marks 10) ============== (CLO 2)

Given the following set of processes.

Process Burst-Time Arrival-Time


P1 12 0
P2 8 2
P3 28 22
P4 20 28
P5 4 30
P6 6 32

Draw the Gantt-Chart Showing the Execution of Processes using Preemptive Shortest Job First (Also known
as SRTF) algorithm. Also find the waiting time for process P4 and P5. (8 + 2)
============= Question No.2 (Marks 5) ============== (CLO 5)

Consider a disk with 2000 (0 to 1999) tracks and the queue has random requests from different
processes in the order:
123, 1267, 451, 37, 13, 154, 123, 1174, 1492, 1259
Initially arm is at 154 while previously it was at 103. Starting from the current head position, what
is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests using
the SCAN algorithm?

You might also like