0% found this document useful (0 votes)
3 views

Introduction to OS

The document is a report on the First-Come, First-Served (FCFS) CPU Scheduling Algorithm, detailing its characteristics, advantages, disadvantages, and key metrics. FCFS is a simple, non-preemptive scheduling method that processes tasks in the order they arrive, ensuring fairness but often resulting in inefficiencies like the convoy effect. Despite its limitations, FCFS serves as a foundational concept in operating systems, providing insights for evaluating more advanced scheduling algorithms.

Uploaded by

timtmemory.2025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Introduction to OS

The document is a report on the First-Come, First-Served (FCFS) CPU Scheduling Algorithm, detailing its characteristics, advantages, disadvantages, and key metrics. FCFS is a simple, non-preemptive scheduling method that processes tasks in the order they arrive, ensuring fairness but often resulting in inefficiencies like the convoy effect. Despite its limitations, FCFS serves as a foundational concept in operating systems, providing insights for evaluating more advanced scheduling algorithms.

Uploaded by

timtmemory.2025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

TAMRALIPTA INSTITUTE OF MANAGEMENT

AND TECHNOLOGY (212)

AFFILIATED TO – MAULANA ABUL KALAM AZAD UNIVERSITY OF


TECHNOLOGY(W.B.)

REPORT ON : FCFS CPU SCHEDULING


ALGORITHM
SUBMITTED BY : SUMANA KOLA
PAPER NAME : OPERATING SYSTEM
PAPER CODE : BCAC402
STREAM : BCA
SEMESTER : 4 TH
ROLL NO : 21242723081
REGISTRATION NO : 232121010081

SESSION : 2024-2025

1
CONTENT

SL NO. TOPIC PAGES


01 Abstract 3
02 Introduction 4
03 Characteristics of FCFS CPU Scheduling Algorithm 5
04 Key Metrics for FCFS CPU Scheduling Algorithm 6-8
05 Advantages of FCFS CPU Scheduling Algorithm 9
06 Disadvantages of FCFS CPU Scheduling Algorithm 10

07 Conclusion 11
08 References 12

2
ABSTARCT
The First-Come, First-Served (FCFS) CPU Scheduling Algorithm is a foundational and
widely studied method in the field of operating systems. As the simplest scheduling
algorithm, it operates on a non-preemptive, first-in-first-out basis, prioritizing processes in
the exact sequence of their arrival in the ready queue. The algorithm ensures fairness, as no
process can overtake another in the queue. However, its straightforward nature leads to
significant inefficiencies, such as the "convoy effect," where long processes delay the
execution of shorter ones, resulting in suboptimal system performance. While FCFS is easy
to implement and serves as an introductory concept, its inability to minimize key
performance metrics such as average waiting time and turnaround time highlights its
limitations. Despite these drawbacks, FCFS remains an essential concept for understanding
CPU scheduling, providing a baseline against which more advanced algorithms like Shortest
Job Next (SJN) and Round Robin (RR) can be compared. This paper discusses the
characteristics, advantages, disadvantages, and practical implications of FCFS, shedding light
on its relevance in both academic and practical scenarios.

3
INTRODUCTION
The First-Come, First-Served (FCFS) CPU Scheduling Algorithm is one of the
earliest and simplest methods designed to manage the execution of processes in
operating systems. Drawing inspiration from real-world queue management,
FCFS operates on a first-in, first-out basis, ensuring that the process arriving first
is executed first. This non-preemptive scheduling approach promotes fairness, as
every process is served in the exact order of arrival without interruption.
However, while straightforward in concept and implementation, the algorithm
reveals limitations when applied to diverse workload scenarios.

Key drawbacks, such as the convoy effect, can lead to prolonged waiting times
for shorter processes when a long process occupies the CPU. Furthermore, the
inability to optimize metrics such as waiting time, turnaround time, and response
time makes it less efficient compared to more advanced scheduling algorithms.
Despite these challenges, FCFS remains a foundational topic in the study of
operating systems, providing essential insights into scheduling mechanics and
serving as a baseline for evaluating other algorithms like Shortest Job Next (SJN)
and Round Robin (RR).

This introduction provides a comprehensive overview of FCFS and sets the stage
for deeper discussions into its mechanics, advantages, disadvantages, and use
cases.

4
Characteristics OF FCFS CPU
Scheduling Algorithm
1. Non-Preemptive Scheduling:
In FCFS, processes are executed without interruption. Once a process starts
execution, it runs to completion, regardless of whether other processes with
shorter burst times are waiting.

2. First-In-First-Out (FIFO) Principle:


Processes are executed in the exact order in which they arrive in the ready
queue, ensuring that the earliest arriving process is completed first.

3. Simplicity:
FCFS is one of the simplest scheduling algorithms to implement, as it requires
minimal computation and follows a straightforward queue-based structure.

4. Fairness:
Every process is treated equally by being executed in the order of arrival. No
process can bypass another, which makes it fair in terms of scheduling.
5. Convoy Effect:
FCFS suffers from the convoy effect, where one long process delays all
subsequent processes, leading to inefficiencies in average waiting and
turnaround times.

6. Lack of Optimization:
FCFS does not optimize key scheduling criteria such as waiting time, turnaround
time, or response time. This can lead to poor performance, especially in cases of
varying process burst times.

7. Sequential Processing:
Processes are handled one at a time. There is no simultaneous or parallel
execution in FCFS scheduling.

8. Susceptibility to Starvation:
While FCFS does not typically cause starvation under normal circumstances,
processes with shorter burst times may experience delays when they are
queued behind a long-running process.
5
Key Metrics for FCFS CPU Scheduling
Algorithm
1. Completion Time (CT):
Definition: The time at which a process completes its execution.

How to Calculate: Add the burst time of each process in the order of execution.

2. Turnaround Time (TAT):


Definition: The total time taken by a process from its arrival in the ready queue
to its completion.

Formula: $$ Turnaround\ Time = Completion\ Time - Arrival\ Time $$

Significance: Measures the overall time a process spends in the system.

3. Waiting Time (WT):


Definition: The amount of time a process spends waiting in the ready queue
before getting executed.

Formula: $$ Waiting\ Time = Turnaround\ Time - Burst\ Time $$

Significance: Helps evaluate the responsiveness of the system.

4. Burst Time (BT):


Definition: The time required by a process to complete its execution on the CPU.

Note: Burst time is provided as input and does not change during the execution.

6
5. Average Waiting Time (AWT):
Definition: The average of the waiting times of all processes.

Formula: $$ Average\ Waiting\ Time = \frac{\sum Waiting\ Times}{Number\ of\


Processes} $$.

6. Average Turnaround Time (ATAT):


Definition: The average of the turnaround times of all processes.

Formula: $$ Average\ Turnaround\ Time = \frac{\sum Turnaround\


Times}{Number\ of\ Processes} $$.

Example:

Let's consider an example with the following processes:

Step-by-step execution:

At time = 0, only P1 is in the queue, so it starts execution.

P1 completes at time = 4. Now P2 and P3 are in the queue. P2 arrived first, so it


is executed next.

P2 completes at time = 7. Finally, P3 is executed and finishes at time = 8.

7
Final Metrics:

8
Advantages of FCFS CPU Scheduling
Algorithm
1. Simplicity:
FCFS is the simplest CPU scheduling algorithm to understand and implement. It
uses a straightforward first-in, first-out (FIFO) approach, making it easy to
manage.

2. Fairness:
Processes are executed in the exact order of their arrival, ensuring no process is
skipped or given undue priority over others.

3. Predictable Behavior:
Since processes are scheduled based on arrival time, the execution order is
predictable, which can help in systems where task predictability is important.

4. Low Overhead:
FCFS has minimal scheduling overhead because it doesn't require complex
calculations or priority handling, making it suitable for simple systems.

5. No Starvation:
Every process eventually gets executed in FCFS, eliminating the risk of starvation
(where a process is indefinitely delayed from execution).

6. Practical for Batch Systems:


In batch processing systems, where all processes are ready at the same time,
FCFS can be an effective scheduling method due to its simplicity.

9
disadvantages of FCFS CPU
Scheduling Algorithm
1. Convoy Effect:
A long-running process at the front of the queue can delay all the shorter
processes behind it. This leads to inefficiency and can increase average waiting
and turnaround times.

2. Poor Average Wait Time:


Since processes are scheduled in the order of arrival, shorter processes that arrive
after longer ones experience higher waiting times, resulting in suboptimal system
performance.

3. Non-Optimal Turnaround Time:


The algorithm doesn't minimize turnaround time, as it doesn't consider the burst
time or priority of processes when scheduling.

4. No Prioritization:
FCFS does not allow for prioritization. Processes are treated equally, regardless
of their urgency or importance, which may not be suitable for critical real-time
tasks.

5. Starvation of Short Processes:


Although FCFS ensures every process is eventually executed, shorter processes
can experience significant delays if they are queued behind longer ones,
effectively leading to "temporary starvation."

6. Lack of Flexibility:
Being a non-preemptive algorithm, FCFS cannot accommodate processes that
need immediate attention or respond to dynamically changing workloads.

7. Inefficiency in Interactive Systems:


FCFS is unsuitable for time-sharing or interactive systems where responsiveness
is critical, as the response time can be significantly delayed due to the execution
order.

10
Conclusion

The First-Come, First-Served (FCFS) CPU Scheduling Algorithm is a foundational


scheduling method that emphasizes simplicity and fairness by executing
processes in the order of their arrival. Its straightforward, non-preemptive
approach makes it easy to implement and understand, making it an ideal
teaching tool and a baseline for evaluating other algorithms.

However, FCFS's limitations, such as the convoy effect and poor optimization of
average waiting and turnaround times, often make it unsuitable for modern,
dynamic computing environments where efficiency and responsiveness are
critical. It performs best in systems with predictable workloads, such as batch
processing systems, but struggles in scenarios with diverse or time-sensitive
tasks.

Despite these challenges, FCFS remains an essential concept in operating


systems, offering valuable insights into the trade-offs between simplicity and
performance in CPU scheduling. Understanding FCFS provides a strong
foundation for exploring more advanced scheduling algorithms.

11
References

Tutorials Point - FCFS Scheduling Algorithm: This resource explains the basics of
FCFS, its implementation, and real-life examples.

Guru99 - FCFS Scheduling Algorithm: Offers a comprehensive overview of FCFS,


including examples and its advantages and disadvantages.

Tutorials Point - Process Scheduling Algorithms: Covers FCFS along with other
popular scheduling algorithms for comparison.

 By my own self- study.

12

You might also like