Skip to content

eneskeles/disk-scheduling-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disk Scheduling Simulation

This piece of code simulates the behavior of following disk scheduling algorithms:

  • FCFS (First Come First Served)
  • SSTF (Shortest Seek Time First)
  • LOOK
  • CLOOK

For a given set of disk requests, total time, average waiting time and standard deviation of waiting time is outputted.

Requirements

  • GCC 4.5 or later (Supports C99)
  • GNU make

Usage

Build by:

$ make

Run on input:

$ ./ds <num_of_disk_requests> <input_filename>

Input format

The input should be given as rows of <request_arrival_time> <request_cylinder> pairs, each row separated by an EOL character.

Sample Run

Input

Output

Ending lines at the output shows name of the algorithm, total time required for all requests to be handled, average waiting time, and standard deviation of waiting times.

Contributors

Written together with Buğra Aydın

About

simulation of disk scheduling algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published