×

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

HRRN Scheduling in OS

Highest Response Ratio Next (HRRN) Scheduling in OS Highest Response Ratio Next Scheduling is a Non-Preemptive Scheduling algorithm. This algorithm provides the benefits of the shortest job first scheduling algorithm and also removes...

6 minutes read.

Ubuntu Operating System

Ubuntu Operating System Ubuntu is an open-source and a Linux based operating system. Ubuntu is developed for the Network Servers, Computers, and Smartphones. The Ubuntu operating system was developed by Canonical...

3 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.

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.

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.

Multiprogramming Operating System

You will discover more about the multiprogramming operating system in this post, including how it functions and its benefits and drawbacks. Each process needs several types of system time, including CPU...

4 minutes read.

Batch Operating System

Computers were once quite huge devices that operated from a console. Tape drives, punch cards, line printers were often utilized for the output, and tape drivers or card readers for...

4 minutes read.

Page Table in Operating System

What is a Page Table? A page table is a data structure used by an operating system (OS) to store information about the physical location of the pages in a computer's...

6 minutes read.

Test Set Lock Mechanism | Operating System

Modification in the Assembly Code The problem in the lock variable is that, in some cases, the process reads the previous or old value of the lock variable and enters into the critical...

4 minutes read.

Process State in OS

The Process passes from different states, from its formation to completion. The following are the states of the Process. NewReadyRunningBlock or WaitTerminated or CompletedSuspend readySuspend wait or suspend blocked 1. New: - The state in which a process...

2 minutes read.

Functions of Operating System

The functions of Operating System are: Process Management Memory Management File Management Device Management Secondary storage Management Security Coordination between other software and users Networking Job Accounting Error detecting aids 1. Process Management Process Management support operating system to create and delete...

3 minutes read.

Kernel in OS

What is Kernel in OS? The kernel is the core component in the operating system. The job of the kernel is to handle the communication between the hardware and the software. ...

2 minutes read.

Multitasking Operating Systems

An operating system is the fundamental piece of software that enables a computer system to function and execute a command as intended. The user interface, hardware, and every other piece...

7 minutes read.

Components of Operating System

Components of Operating System: An operating system is a complex and vast system. We can only create the operating system by dividing it into small parts. Each part must be...

5 minutes read.

Booting Process in Operating System

What is Booting? Booting is defined as the term which says that the process of loading the operating system into the memory. The process of booting begins when we switch on...

4 minutes read.

What is Scheduling on OS

Scheduling is the process which is used to share the computing resources such as memory, processor time, and bandwidth to the different processes, data flows, threads, and applications which need them. Scheduling is...

5 minutes read.

Feedback Queue in Operating System

In a computer or a laptop, there is a processor which do all the tasks. The processor cannot do all the tasks at a time. So, the tasks will be...

3 minutes read.

Trap vs Interrupt in Operating System

What is Trap in Operating System? A trap is a synchronous interrupt used to perform functionality when an error occurs in a user process. A trap in an operating system can...

4 minutes read.

Semaphore in Operating System

What is Semaphore in Operating System Semaphore is defined as an integer variable which is used to solve the problem of the critical section in process synchronization. In semaphore, we use...

3 minutes read.

Difference between Multi-programming and Multitasking

Difference between Multiprogramming and Multitasking         Multiprogramming  Multitasking In Multiprogramming, at the same time, we can run the multiple processes concurrently on one...

2 minutes read.