×

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

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.

CPU Scheduling in OS

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

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

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.

Difference between C-LOOK and C-SCAN Disk Scheduling Algorithm

Disk scheduling is used by operating systems to arrange the arrival of I/O requests to the disc. I/O scheduling is another name for disc scheduling. Disk scheduling is necessary because...

4 minutes read.

Can a Computer Run Without the Operating System

Computers may function right out of the box, mostly due to operating systems. Nowadays, there are probably already some pre-installed apps in a new computer when you buy one. Have...

9 minutes read.

Multi-user Operating Systems

Introduction Since only one user may interact with the computer at any given time, the operating system we use on our personal computers, laptops, tablets, and phones is sometimes referred to...

8 minutes read.

Turn Variable or Strict Alternative Approach

Turn Variable or Strict Alternative Approach Turn Variable Approach is used for process synchronization mechanism, which offers synchronization between two processes. Turn variable is implemented on user mode, and it is a software mechanism. We...

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.

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.

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.

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.

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

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

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.

Banker’s Algorithm in Operating System

What is Banker’s Algorithm? Bankers algorithm is an algorithm which is used for deadlock avoidance and resource allocation. It was established by Edsger Dijkstra. The reason behind the name ‘banker’s algorithm’...

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

SJF Scheduling in OS

Shortest Job First (SJF) Scheduling in OS Shortest Job First is a Preemptive or Non-Preemptive algorithm. In the shortest job first algorithm, the job having shortest or less burst time will...

4 minutes read.

Why is it critical for the Scheduler to distinguish between I/O-bound and CPU-bound programs

A CPU-bound process is one that spends most of its time executing instructions on the processor. A process that is I/O-bound spends most of its time waiting for input and...

2 minutes read.

Thrashing in Operating System

A virtual memory system's poor performance when the same pages are loaded repeatedly due to a lack of main memory to store them in secondary memory is referred to as...

3 minutes read.