menu
Difference between FCFS and SSTF Disk Scheduling Algorithm - javatpoint
Difference between FCFS and SSTF Disk Scheduling Algorithm - javatpoint
Difference between FCFS and SSTF Disk Scheduling Algorithm with OS Tutorial, Types of OS, Process Management Introduction, Attributes of a Process, CPU Scheduling, FCFS with overhead, FCFS Scheduling etc.

Difference between FCFS and SSTF Disk Scheduling Algorithm - javatpoint

In this article, you will learn the difference between the FCFS and SSTF disk scheduling algorithm. But before discussing the differences, you need to know about the FCFS and SSTF disk scheduling algorithm.

FCFS stands for First-Come-First-Serve. It is a very easy algorithm among the all-disk scheduling algorithms. It is an OS disk scheduling algorithm that runs the queued requests and processes in the way that they arrive in the disk queue. It is a very easy and simple CPU scheduling algorithm. In this scheduling algorithm, the process which requests the processor first receives the processor allocation first. It is managed with a FIFO queue.

Example:

Let's take a disk with 180 tracks (0-179) and the disk queue having input/output requests in the following order: 81, 110, 38, 156, 68, 172, 92, 10. The initial head position of the Read/Write head is 45. Find the total number of track movements of the Read/Write head using the FCFS algorithm.

Solution:

Total head movements,

The initial head point is 45,

= (81-45) + (110-81) + (110-38) + (156-110) + (156-68) + (172-156) + (172-92) + (92-10)

= 36 + 29 + 72 + 46 + 88 + 16 + 80 + 82

= 449

There are various advantages and disadvantages of FCFS Disk Scheduling Algorithm. These advantages and disadvantages are as follows:

Advantages

Disadvantages

SSTF stands for Shortest Seek Time First, and it serves the request that is closest to the current position of the head. The direction of the head pointer is quite important in this algorithm. When a tie happens between requests, the head will serve the request in its current direction. In comparison to the FCFS, the SSTF algorithm is very efficient in terms of the total seek time.

Example:

Let's take an example to understand the SSTF Disk Scheduling Algorithm. Let's take a disk with 180 tracks (0-179) and the disk queue having input/output requests in the following order: 87, 110, 50, 172, 67, 156, 39, 15. The initial head position of the Read/Write head is 45 and will move in the left-hand side direction. Find the total number of track movements of the Read/Write head using the SSTF algorithm.

Solution:

Total head movements,

Initial head point is 45,

= (50-45) + (50-39) + (39-15) + (67-15) + (87-67) + (110-87) + (156-110) + (172-156)

= 5 + 11 + 14 + 52 + 20 + 23 + 46 + 16

= 187

There are various advantages and disadvantages of SSTF Disk Scheduling Algorithm. These advantages and disadvantages are as follows:

Advantages

Disadvantages

Here, you will learn the main differences between the FCFS and SSTF Disk Scheduling Algorithm. Various differences between the FCFS and SSTF Disk Scheduling Algorithm are as follows:

Here, you will learn the head-to-head comparison between the FCFS and SSTF Disk Scheduling Algorithm. The main differences between the FCFS and SSTF Disk Scheduling Algorithm are as follows:

Splunk

SPSS

Swagger

Transact-SQL

Tumblr

ReactJS

Regex

Reinforcement Learning

R Programming

RxJS

React Native

Python Design Patterns

Python Pillow

Python Turtle

Keras

Aptitude

Reasoning

Verbal Ability

Interview Questions

Company Questions

Artificial Intelligence

AWS

Selenium

Cloud Computing

Hadoop

ReactJS

Data Science

Angular 7

Blockchain

Git

Machine Learning

DevOps

DBMS

Data Structures

DAA

Operating System

Computer Network

Compiler Design

Computer Organization

Discrete Mathematics

Ethical Hacking

Computer Graphics

Software Engineering

Web Technology

Cyber Security

Automata

C Programming

C++

Java

.Net

Python

Programs

Control System

Data Mining

Data Warehouse

JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.

JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week

Website Development

Android Development

Website Designing

Digital Marketing

Summer Training

Industrial Training

College Campus Training

Address: G-13, 2nd Floor, Sec-3

Noida, UP, 201301, India

Contact No: 0120-4256464, 9990449935

© Copyright 2011-2021 www.javatpoint.com. All rights reserved. Developed by JavaTpoint.