0% found this document useful (0 votes)
13 views4 pages

Experiment 10 OS

Uploaded by

awesoham27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Experiment 10 OS

Uploaded by

awesoham27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Exp.

10 - Part A
Aim:
Write and execute a c program to implement First Come First Serve, C-Look Disk Scheduling
Algorithm.
Requirements: C Programming knowledge and understanding of disk scheduling concept.
Outcome: Understand the disk scheduling algorithms in an operating system..
Theory:
It is the simplest form of disk scheduling algorithms. The I/O requests are served or processes
according to their arrival. The request arrives first will be accessed and served first. Since it
follows the order of arrival, it causes the wild swings from the innermost to the outermost tracks of
the disk and vice versa.
We illustrate them with a request queue (0-199).

Instructions:
1. Take input queue of request and then draw request entertainment flow based on the concept
of FCFS disk scheduling concept.
Exp.10- Part B
Name of Student: SOHAM HANDE Roll No.: A129
Programme: BTECH AIDS
Output:
Observation & Learning:
Conclusion:
Questions:
1. Solve the following using FCFS disk scheduling algorithm.

Work Queue: 23, 89, 132, 42, 187

there are 200 cylinders numbered from 0 - 199

the disk head stars at number 100

To solve the problem using the **First-Come, First-Served (FCFS)** disk scheduling
algorithm, we simply follow the order of the requests in the queue. The disk head starts at
cylinder 100, and the queue of requests is processed sequentially in the order given.

Work Queue:

23, 89, 132, 42, 187

Initial Head Position:

100

We calculate the total movement of the disk head by finding the absolute difference
between the current position and the next request in the queue, then summing them all.

1. Move from 100 to 23:


Movement = |100 - 23| = 77 cylinders

2. Move from 23 to 89:

Movement = |23 - 89| = 66 cylinders

3. Move from 89 to 132:

Movement = |89 - 132| = 43 cylinders

4. Move from 132 to 42:

Movement = |132 - 42| = 90 cylinders

5. Move from 42 to 187:

Movement = |42 - 187| = 145 cylinders

Total Head Movement:


To get the total movement of the disk head, we sum all the movements calculated:

Total Movement= 77 + 66 + 43 + 90 + 145 = 421 cylinders

You might also like