##### Disk scheduling

1. An application loads 100 libraries at start up. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10ms. Rotational speed of the disk is 6000 rpm. If all the libraries are loaded from random locations on the disk, how long does it takes to load all the libraries.

ANS:1.5 sec

2.

Consider a disk with the following specification:

Number of surfaces: 32

Number of tracks/surfaces: 512

Number of sectors/tracks: 1K

Sector size :4KN

Disk rpm: 3600

The effective data rate is ______MB/sec

Ans: 240

3. Consider a Disk having  a program of size 256 KB. Program resides on disk in the form of pages of 4KB eack. The disk average seek time is 30ms and rotation time is 20ms. Track size is 128KB, 50% of the pages of the program are contiguous and the remaining are distributed randomly around the disk. The time for loading this program in seconds is _____

Ans: 1.36

4. A privileged instruction may be executed only when the hardware is in kernel mode. Which of the following is least likely to be a privileged instruction?

a) instruction  changing the PC

b) Instruction sending output to a printer

c) Instruction modifying memory management register.

d)Instruction that creates a child process.

Arul
2 Feb 2015 11:18 am

I would be nice, if you post the questions one-by-one.

Anyway, I will attempt 2nd & 3rd.

2. total track capacity = number of sectors * sector size = 1K * 4 KB = 4 MB

in 60 seconds, the disk rotates 3600 times.

time taken for one rotation = 60/3600 = 1/60 seconds.

In 1/60 seconds, 4MB will be transferred. So, data rate = 240 MB/s.

3. 50 % of program is residing continuously. i.e., 128KB

given seek time = 30 ms, rotation time = 20 ms

total time for 50% data to be transferred = seek time + rotational latency + rotation time = 30 + (20/2) + 20 = 60 ms

for the remaining 50% data (128KB), let us consider that each page of 4KB resides in different location of disk.

total number of pages to be accessed = 128KB/4KB = 32

time taken for accessing 1 page = seek time + rotational latency + rotation time = 30 + (20/2) + (4KB/128KB)*20 = 40.625 ms

total time = 60 ms + 32 * (40.625) = 1.36 seconds

Aparajita Mehta
3 Feb 2015 09:51 am

what is the difference between rotational latency and rotation time? and why we did (4/128)*20 , I was not able to understand, Please explain!