×

Difference between C-SCAN and SSTF Disk Scheduling Algorithm

C-SCAN / Circular Elevator

The circular SCAN (C-SCAN) scheduling method is a modified version of the SCAN disc scheduling technique that addresses the SCAN algorithm's inefficiency by more equitably serving requests. C-SCAN, like the SCAN (lift algorithm), moves the head from one end to the other, fulfilling all requests. However, once the head reaches the other end, it returns to the start of the disk without any requests along the way (see chart below) and starts serving again after reaching the start. The "Circular Elevator Algorithm" is named by the fact that it interprets the cylinders as a circular list that loops around from the last to the first.

Benefits:

  • This ensures a consistent wait time.
  • This allows for faster response times.
  • The head moves from one end of the disk to the other, fulfilling all requests along the way.
  • The C-SCAN scheduling method is an upgraded variant of the SCAN algorithm.

Drawback:

  • It might not be fair to service requests for tunes on the furthest reaches of the spectrum.
  • When compared to the SCAN Algorithm, it has more seek motions.

Example:

Consider a disc with 180 tracks (0-179) and a disc queue with input/output requests in the following order: 75, 90, 40, 135, 50, 170, 65, 10, 75, 90, 40, 135, 50, 170, 65, 10, 75, 90, 40, 135, 50, 170, 65, 10, 75, 90, 40, 135, 50, 170, 65, 10, 75, 90, 40 The Read/Write head's starting position is 45 degrees, and it will travel to the right. Using the C-SCAN method, determine the total number of track movements of the Read/Write head.

Answer:

Difference Between C-SCAN And SSTF Disk Scheduling Algorithm

Head motions in total,

The starting position for the head is 45 degrees.

= (50-45) + (65-50) + (75-65) + (90-75) + (135-90) + (170-135) + (179-170) + (179-0) + (10-0) + (179-170) + (179-0) + (10-0) + (40-10)

= 15 + 45 + 35 + 9 +179 + 10 + 30 = 5 + 15 + 10 +15 + 45 + 35 + 9 +179 + 10 + 30

= 353

SSTF Disk Scheduling Algorithm

Shortest Seek Time First (SSTF) is an acronym for "shortest seek time first." This approach fulfils the task request that is closest to the present location of the head or pointer, as the name implies. In this case, the direction of the head is crucial in calculating total head movement. If there is a tie between requests, the head will serve the request that comes first in the order in which it was received. In comparison to C-LOOK, the SSTF algorithm is extremely efficient in terms of overall search time. SSTF scheduling priority is given to processes that have the fewest searches. To do this, the time of each request is calculated in advance in the queue, and then requests are scheduled based on their search time.

Benefits:

  • It enhances and expands throughput.
  • The overall seek time of the SSTF is less than that of the FCFS.
  • It offers a faster response time and a shorter average wait time.

Drawback:

  • Requests made far from the head might result in starvation.
  • The significant variation in response time and waiting time is accessible in the SSTF disc scheduling technique.
  • Frequent changes in the direction of the head slow down the algorithm.

Example:

To further understand the SSTF Disk Scheduling Algorithm, let's look at an example. Consider a disc with 180 tracks (0-179) and a disc queue with the following input/output requests: 92, 100, 40, 148, 67, 170, 29, ten, ten, ten, ten, ten, ten, ten, ten, ten The Read/Write head's starting position is 45 degrees, and it will shift to the left side. Using the SSTF technique, calculate the total number of track movements for the read/write head.

Answer:

Difference Between C-SCAN And SSTF Disk Scheduling Algorithm

Head motions in total,

The initial head point is 45 degrees.

= (45-40) + (40-29) + (29-10) + (67-10) + (92-67) + (100-92) + (148-100) + (100-92) + (148-100) + (170-148)

= 5 + 11 + 19 + 57 + 25 + 8 + 48 + 22 = 5 + 11 + 19 + 57 + 25 + 8 + 48 + 22

=195

Major Differences

S no.C-SCANSSTF
1.The C-SCAN algorithm can only handle queries in one way at a timeThe SSTF algorithm, on the other hand, can handle requests in both directions.  
2.In terms of average waiting and reaction time, the C-SCAN algorithm has a low variance.The SSTF disc scheduling technique, on the other hand, has a wide range of response times and average waiting times.
3.More seek time is caused by the C-SCAN disc scheduling method.The SSTF disc scheduling technique, on the other hand, bears the overhead of locating the nearest request.
4.Requests would never be denied due to the C-SCAN disc scheduling method.The SSTF disc scheduling technique, on the other hand, has the potential to create starvation.

Related Topics

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.

FCFS Scheduling in OS

FCFS: First Come First Serve Scheduling in OS FCFS is a non-preemptive and preemptive scheduling algorithm that is easy to understand and use. In this, the process which reaches first is...

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

MS-DOS Operating System

It is also referred to occasionally as "DOS", an abbreviation for disc operating systems. Operating systems with a graphical user interface (GUI) in different iterations of the graphical Microsoft Windows...

5 minutes read.

Free Space Management in Operating System

What is Free Space Management? The system always keeps the records of the free disks blocks for allocating space to files when they are created. To use the space free from...

4 minutes read.

Difference between SSTF and LOOK Disk Scheduling Algorithm

Shortest Seek Time First / SSTF Shortest Seek Time First (SSTF) is an acronym for "shortest seek time first." The task request that is closest to the present position of the...

4 minutes read.

Linux Operating System

What is Linux? The Linux operating system is used on various devices, including cellphones, automobiles, supercomputers, household gadgets, personal computers, and business servers. You can find Linux on your phones, thermostats, vehicles,...

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

Process Schedulers and Process Queue in OS

Process Schedulers There are various types of Process Schedulers: Long Term SchedulerShort Term SchedulerMedium Term Scheduler                                            Long Term Scheduler: - Long term scheduler is also referred to as Job Scheduler. The task of the Long-term...

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.

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.

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.

Interested Variable Mechanism

Interested Variable Mechanism It is a must to provide progress to the process synchronization mechanism. In variable mechanism, if there is a process that doesn’t need to enter into the critical section, then due...

5 minutes read.

Paging and Segmentation in OS

What is Paging in OS? Paging is a storage technique used for memory management. In paging, the (OS) Operating System retrieves the processes from the secondary memory into the main memory,...

6 minutes read.

Lock Variable Mechanism | Operating System

Lock Variable Mechanism The Lock variable mechanism is a synchronization mechanism that is implemented in a user mode. It is a software procedure. Lock variable is a solution for busy waiting that can be...

3 minutes read.

Need of Operating System

There are various needs of operating system: Managing Input-Output UnitThe Operating system as a platform for application programsMultitaskingConsistent user interface Managing Input-Output Unit: - With the help of the operating system, the...

2 minutes read.

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.

Monitors in Operating System

Monitors in Operating System Monitors are used for process synchronization. With the help of programming languages, we can use a monitor to achieve mutual exclusion among the processes. Example of monitors:...

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

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.