×

Difference between SCAN and FCFS Disk Scheduling Algorithm

SCAN / Elevator Algorithm

A different form of disc scheduling method is the SCAN disc scheduling algorithm. We move the disc arm in a certain direction in this process (the direction can be moved to the larger value or the smallest value). Each request that comes into its route is answered, and when it reaches the end of the disc, the disc arm moves backwards, and all requests that come into its path are addressed. Because it works like an elevator, the scan disc scheduling technique is sometimes known as an elevator algorithm.

Benefits:

  • The response time variance in SCAN disc scheduling is modest.
  • Throughput is high with this algorithm.
  • The response time is typical.
  • There is no hunger in SCAN disc scheduling.

Drawback:

  • The SCAN disc scheduling technique takes a long time to visit cylinders that have recently been visited by the head.
  • Even if there are no requests to serve, we must move the disc head to the end of the disc in SCAN disc scheduling.

Example:

Consider a disc with tracks 0-199 and the track numbers 93, 176, 42, 148, 27, 14, 180, and 93, 176, 42, 148, 27, 14, 180, respectively, in the request queue. The read/write head is currently at position 55, and it is pointing in the direction of the bigger value. Count the total number of cylinders moved by the head, using scan disc scheduling. The disc has 200 tracks, as seen in the following example. As a result, we'll use a track line ranging from 0 to 199.

The read/write head is now at position 55. As a result, we begin at 55 and then shift the read/write head. When all requests are met, the total number of cylinders moved by the head is calculated.

Difference Between SCAN And FCFS Disk Scheduling Algorithm

= (199-50) + (199-14)

= 329

FCFS Disk Scheduling Algorithm

FCFS is an operating system scheduling method that automatically executes queued requests and processes in the order of their arrival. This is the simplest and most straight forward CPU scheduling algorithm. Processes requesting CPU first get the first CPU allocation in this type of method. A FIFO queue is used to manage this. FCFS stands for first come, first served. The FCFS (First-Come-First-Serve) disc scheduling method is the simplest of all the scheduling algorithms. Each input/output request is presented in the order that they arrive in the FCFS disk scheduling mechanism. Because FCFS addresses each request, there is no hunger in this process. Example: Purchasing a movie ticket at the box office is an example of the FCFS system in action. A person is serviced according to the queue method in this scheduling system.The person who is in the first row buys the ticket first, followed by the next ticket. This will continue until the ticket is purchased by the last person in line. The CPU process operates in a similar way when using this technique.

Benefits:

  • There is no unlimited delay in FCFS disc scheduling.
  • FCFS disc scheduling avoids hunger by giving each request an equal opportunity.

Drawback:

  • FCFS scheduling is not the finest service available.
  • Scheduling disc time is not optimal in FCFS.

Example:

Considering the same problem statement shown in the example of SCAN Disk Scheduling Algorithm above. The read/write head is now at position 55. As a result, we'll start at 55 and work our way through the FCFS sequence of read/write heads. When all requests are met, the total number of cylinders moved by the head is calculated.

Difference Between SCAN And FCFS Disk Scheduling Algorithm

= (176-55) + (176-42) + (148-42) + (148-14) + (180-14)

= 121+134+106+134+166

=661   

Difference between SCAN and FCFS Scheduling algoritm.

S no.SCANFCFS
1.The scan scheduling algorithm processes requests in one way until it reaches the end of the disk, at which point the disk arm changes direction and begins serving requests in the opposite order.The FCFS Scheduling Algorithm will process requests in the order they are received in the disc queue.
2.It's possible that the request's location was recently visited by the disc arm, causing the request to take a lengthy time to complete.There are less risks of extended postponement using the FCFS algorithm since requests are handled according to schedule.
3.The SCAN algorithm outperforms the FCFS scheduling method in terms of throughput.Of all the disk scheduling techniques, the FCFS algorithm has the lowest throughput.
4.When compared to the FCFS scheduling method, the SCAN algorithm has a substantially shorter average search time.Because it does not aim to minimise the seek time, the FCFS method has the longest average seek time of all the disc scheduling algorithms.

Related Topics

Real-time Operating System

In this essay, we will thoroughly understand the real-time operating system. Real-Time Operating System: What do you mean? For any task to be completed, a real-time operating system (RTOS), a special-purpose operating...

5 minutes read.

Process Management in OS

A Program will not do anything unless a CPU executes its instructions. An executing program is called a process. The Process requires computer resources to complete its task. More than...

3 minutes read.

Difference between Seek Time and Disk Access Time in Disk Scheduling

Seek Time The time taken for the hard disk controller to detect a specific piece of recorded data is known as the seek time. The amount of time it takes to...

4 minutes read.

Two Phase Locking Protocol

What is two phase locking? Two-phase locking is a concurrency control method in a database and transaction processing system. It ensures that transactions are executed in a serializable manner by requiring...

4 minutes read.

Look Disk Scheduling

Look Disk Scheduling Look disk scheduling is another type of disk scheduling algorithm. Look scheduling is an enhanced version of SCAN disk scheduling. Look disk scheduling is the same as SCAN disk scheduling,...

4 minutes read.

FCFS (First-Come-First-Serve) Disk Scheduling Algorithm

FCFS Disk Scheduling Algorithm FCFS (First-Come-First-Serve) is the easiest disk scheduling algorithm among all the scheduling algorithms. In the FCFS disk scheduling algorithm, each input/output request is served in the order...

4 minutes read.

Operating System Tutorial

What is an Operating System? An Operating System is a System Software that handles the resources of a computer such as computer hardware and software and offers frequent services to the...

7 minutes read.

Priority Scheduling in OS

Priority Scheduling is a type of CPU Scheduling algorithm which is used for process scheduling. In Priority Scheduling, we assign some priorities to each process. The process which has higher priority among all...

5 minutes read.

Contiguous Memory Allocation in Operating System

Memory is a place where data, facts, figures, and information are stored for temporary or permanent access the data in future, which is also considered as the storage place. Allocation of...

4 minutes read.

Single-User Operating System

An operating system designed and intended to be used on a computer or device with a single user at a time is known as a single-user operating system. Devices like...

8 minutes read.

How to implement Monitors using Semaphores

Monitors Monitor is a type of synchronization device designed to solve difficulties caused by semaphores, such as timing errors. Monitors are the type of data types that are abstract by nature...

2 minutes read.

What is Context Switching

Context Switching is the switching of CPU from one process to another process. Context switching means storing the process state so that we can reload the process when needed, and the execution...

3 minutes read.

Advantages of UNIX Operating System

What is UNIX OS? UNIX is a family of multitasking, multiuser operating systems that are used on a wide variety of computer platforms. It was developed in the late 1960s and...

4 minutes read.

Segmentation in Operating System

The term segmentation in operating system refers to the division of computer memory into segments. Segmentation is a technique used by many modern operating systems to provide better memory management....

4 minutes read.

SCAN Disk Scheduling Algorithm

SCAN Disk Scheduling Algorithm The SCAN disk scheduling algorithm is another type of disk scheduling algorithm. In this algorithm, we move the disk arm into a specific direction (direction can be moved towards...

4 minutes read.

Operating System Services

The Operating System provides various types of services:   I/O operationProgram executionFile system manipulationCommunicationError HandlingResource allocationAccountingProtection 1. I/O Operation: - To execute a program, needs I/O, which consists of a file, or I/O device. Due to the protection...

3 minutes read.

Types of Operating System

There are various types of operating system: Simple Batch Operating SystemMultiprogramming batch Operating SystemTime-sharing Operating SystemMultiprocessor Operating SystemDistributed Operating SystemNetwork Operating SystemReal-time Operating SystemMobile Operating System Simple Batch operating system In the simple batch operating system, there is no direct communication between...

6 minutes read.

Difference between Protection and Security in Operating System

Some operating system mechanisms facilitate us to stop tampering with logical and physical resources. Some of these methods are security and protection. Protection and security are distinct concepts, despite the...

3 minutes read.

Disk Scheduling Algorithms

Disk Scheduling Algorithms Disk scheduling algorithms are the algorithms that are used for scheduling a disk. Generally, the scheduling refers to a time-table for completing any task or a job. With the help...

2 minutes read.

Memory Management in Operating System

The term "Main Memory" refers to the computer's internal physical memory. It is distinguished from external mass storage devices like disk drives by using the term "main." RAM is another...

4 minutes read.