Operating System Tutorial

Operating System Tutorial Types of Operating System Evolution of Operating System Functions of Operating System Operating System Properties Operating System Services Components of Operating System Needs of the Operating System

Operating Systems

Linux Operating System Unix Operating System Ubuntu Operating System Chrome Operating Systems Fedora Operating System MAC Operating System MS Windows Operating System Solaris Operating System Cooperative Operating System CorelDRAW Operating System CentOS FreeBSD Operating Systems Batch Operating System MS-DOS Operating System Commercial Mobile Operating Systems

Differences

Difference Between Multi-programming and Multitasking Difference between C-LOOK and C-SCAN Difference between Rotational Latency and Disk Assess Time Trap vs Interrupt Difference between C-SCAN and SSTF Difference between SCAN and FCFS Difference between Seek Time and Disk Access Time Difference between SSTF and LOOK Difference between Process and Program in the Operating System Difference between Protection and Security in Operating System

How To

How to implement Monitors using Semaphores How to Install a Different Operating System on a PC

Questions

What is Kernel and Types of Kernel What is DOS Operating System What is Thread and Types of Thread What is Process Scheduler and Process Queue What is Context Switching What is CPU Scheduling What is Producer-Consumer Problem What is Semaphore in Operating System Monitors in Operating System What is Deadlock What is Paging and Segmentation What is Demand Paging What is Virtual Memory What is a Long term Scheduler What is Page Replacement in Operating System What is BSR Mode What is Convoy Effect What is Job Sequencing in Operating System Why is it critical for the Scheduler to distinguish between I/O-bound and CPU-bound programs Why is there a Need for an Operating System

Misc

Process Management Process State Scheduling Algorithm FCFS (First-come-First-Serve) Scheduling SJF (Shortest Job First) Scheduling Round-Robin CPU Scheduling Priority Based Scheduling HRRN (Highest Response Ratio Next) Scheduling Process Synchronization Lock Variable Mechanism TSL Mechanism Turn Variable Mechanism Interested Variable Mechanism Deadlock Avoidance Strategies for Handling Deadlock Deadlock Prevention Deadlock Detection and Recovery Resource Allocation Graph Banker’s Algorithm in Operating System Fixed Partitioning and Dynamic Partitioning Partitioning Algorithms Disk Scheduling Algorithms FCFS and SSTF Disk Scheduling Algorithm SCAN and C-SCAN Disk Scheduling Algorithm Look and C-Look Disk Scheduling Algorithm File in Operating System File Access Methods in Operating System File Allocation Method Directory Structure in Operating System N-Step-SCAN Disk Scheduling Feedback Queue in Operating System Contiguous Memory Allocation in Operating System Real-time Operating System Starvation in Operating System Thrashing in Operating System 5 Goals of Operating System Advantages of Operating System Advantages of UNIX Operating System Bit Vector in Operating System Booting Process in Operating System Can a Computer Run Without the Operating System Dining Philosophers Problem in Operating System Free Space Management in Operating System Inter Process Communication in Operating System Swapping in Operating System Memory Management in Operating System Multiprogramming Operating System Multitasking Operating Systems Multi-user Operating Systems Non-Contiguous Memory Allocation in Operating System Page Table in Operating System Process Scheduling in Operating System Segmentation in Operating System Simple Structure in Operating System Single-User Operating System Two Phase Locking Protocol Advantages and Disadvantages of Operating System Arithmetic operations in binary number system Assemblers in the operating system Bakery Algorithm in Operating System Benefits of Ubuntu Operating System CPU Scheduling Criteria in Operating System Critical Section in Operating System Device Management in Operating System Linux Scheduler in Operating System Long Term Scheduler in Operating System Mutex in Operating System Operating System Failure Peterson's Solution in Operating System Privileged and Non-Privileged Instructions in Operating System Swapping in Operating System Types of Operating System Zombie and Orphan Process in Operating System 62-bit operating system Advantages and Disadvantages of Batch Operating System Boot Block and Bad Block in Operating System Contiguous and Non - Contiguous Memory Allocation in Operating System Control and Distribution Systems in Operations Management Control Program in Operating System Convergent Technologies in Operating System Convoy Effect in Operating System Copy Operating Systems to SSD Core Components of Operating System Core of UNIX Operating System Correct Value to return to the Operating System Corrupted Operating System Cos is Smart Card Operating System Cosmos Operating Systems Examples Generation of Operating System Hardware Solution in Operating System Process Control Block in Operating System Function of Kernel in Operating System Operating System Layers History of Debian Operating Systems Branches and Architecture of Debian Operating Systems Features and Packages of Debian Operating Systems Installation of Operating System on a New PC Organizational Structure and Development in Debian Operating Systems User Interface in Operating System Types Of Memory in OS Operating System in Nokia Multilevel Paging in OS Memory Mapping Techniques in OS Memory Layout of a Process in Operating System Hardware Protection in Operating System Functions of File Management in Operating System Core of Linux Operating System Cache Replacement Policy in Operating System Cache Line and Cache Size in Operating System What is Memory Mapping? Difference Between Network Operating System And Distributed Operating System What is the difference between a Hard link and a Soft Link? Principles of Preemptive Scheduling Process Scheduling Algorithms What is NOS? What is the Interrupt I/O Process? What is Time Sharing OS What is process termination? What is Time-Sharing Operating System What is Batch File File system manipulation What is Message-passing Technique in OS Logical Clock in Distributed System

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.