Skip to content

Java program that computes FCFS, SSTF, and SCAN disk-scheduling algorithms

Notifications You must be signed in to change notification settings

jorienoll/disk-scheduling-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

disk-scheduling-algorithms

This program computes the FCFS, SSTF, and SCAN disk-scheduling algorithms and simulates a simple disk drive, which has a specified number of logical blocks numbered from 0. The program receives a sequence of disk requests, runs the specified scheduling algorithm to determine the order of servicing the requests, and calculates the time of servicing each request, and reports the total time.

To Run This Program: javac disk.java java disk (headPosition) (maxBlocks) (algorithm) (.txt)

For Example, javac disk.java java disk 53 200 FCFS requests.txt

Sample Output: ~/prog3$ java disk 53 200 FCFS requests.txt

Total number of disk requests: 8 Total amount of disk head movement: 640 Total amount of seek time: 64.000000 Total amount of rotational latency: 27.669027 Total amount of transfer time: 0.248000 Total amount of access time: 91.917027

About

Java program that computes FCFS, SSTF, and SCAN disk-scheduling algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages