Advantages of the algorithms:
- FCFS:
- First Come First Serve algorithm has a very simple logic, it executes the process requests one by one in the sequence they arrive.
- In FCFS eventually, each and every process gets a chance to execute, so no starvation occur.
- SSTF:
- The total seek time is reduced compared to First Come First Serve.
- SSTF improves and increases throughput.
- SCAN:
- Scan scheduling algorithm is simple and easy to understand and implement.
- Starvation is avoided in SCAN algorithm.
- CSCAN:
- C-SCAN Algorithm is the successor and the improved version of the SCAN scheduling Algorithm.
- The waiting time for the cylinders which were just visited by the head is reduced in C-SCAN compared to the SCAN Algorithm.
- LOOK:
- If there are no requests left to be services the Head will not move to the end of the disk unlike SCAN algorithm.
- Starvation is avoided in LOOK scheduling algorithm.
- CLOOK:
- In C-LOOK the head does not have to move till the end of the disk if there are no requests to be serviced.
- C-LOOK provides better performance when compared to LOOK Algorithm.
- LIFO:
- Last In First Out algorithm has a very simple logic, it executes the process requests one by one in the reverse sequence they arrive.
- In LIFO eventually, each and every process gets a chance to execute, so no starvation occur.
Disadvantages of the algorithms:
- FCFS:
- This scheduling algorithm is non-preemptive, which means the process can’t be stopped in middle of execution and will run it’s full course.
- The throughput of FCFS is not very efficient.
- SSTF:
- In SSTF there is an overhead of finding out the closest request.
- In SSTF high variance is present in response time and waiting time.
- SCAN:
- Long waiting time occurs for the cylinders which are just visited by the head.
- In SCAN the head moves till the end of the disk despite the absence of requests to be serviced.
- CSCAN:
- More seek movements are caused in C-SCAN compared to SCAN Algorithm.
- In C-SCAN even if there are no requests left to be serviced the Head will still travel to the end of the disk unlike SCAN algorithm.
- LOOK:
- Overhead of finding the end requests is present.
- Cylinders which are just visited by Head have to wait for long time.
- CLOOK:
- In C-LOOK an overhead of finding the end requests is present.
- LIFO:
- This scheduling algorithm is non-preemptive, which means the process can’t be stopped in middle of execution and will run it’s full course.
- The throughput of LIFO is not very efficient.
Implementation of the algorithm: