Shubham OSY
Shubham OSY
Sr.
Characteristic to be Poor Average Good Excellent
No.
assessed (Marks 1-3) (Marks 4-5) (Marks 6 - (Marks 9-10)
8)
(A) Process and Product Assesssment (Convert above total marks out of 6 marks)
1 Relevance to the Course
Literature Survey /
2
Information Collection
Completion of the Target as
3
per project proposal
Analysis of data and
4 representation
5 Quality of Prototype / Model
6 Report Preparation
(B) Individual Presentation / Viva (Convert above total marks out of 4 marks)
8 Presentation
9 Viva
Comments / Suggestions about team work / leadership / inter – personal communication (if any)
Any Other Comment
1
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
MICRO PROJECT
Academic year: 2023-24
TITLE OF PROJECT
First Come First Serve Scheduling
Algorithm
22516
3
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify 1) Borse Shubham Dattu
of 5th Semester of Diploma in Computer Technology of Institute, Shri Hiralal Hastimal
Jain Brothers Polytechnic, Chandwad (Code: 0079) has completed the Micro-Project
satisfactorily in Subject Operating System (22516) for the academic year 2024-2025 as
prescribed in the curriculum.
Place:
Chandwad Date:
/ /2024
4
INDEX
1 Brief Introduction 6
3 Action Plan 6
4 Resources Required 6
Part B
1 Brief Description 7
7 Skill Developed 14
8 Applications of Microproject 14
5
PART A-Plan
3. Proposed Methodology-
The methodology for the First Come, First Serve (FCFS) Scheduling Algorithm microproject
involves the following steps:
1. Problem Definition: Identify the need for scheduling and select the FCFS algorithm for
implementation.
2. Data Input: Gather process information, such as process ID, arrival time, and burst time.
3. Queue Formation: Arrange processes in the order of their arrival times.
4. Execution Simulation:
o Allocate the CPU to each process in the order of the queue.
o Compute start time, completion time, waiting time, and turnaround time for each process.
5. Performance Analysis: Calculate metrics like:
o Average waiting time.
o Average turnaround time.
o Total CPU utilization.
6. Result Representation: Display the process scheduling order and performance metrics using
charts or tables.
7. Conclusion: Highlight observations, such as simplicity and limitations like the convoy effect.
6
4. Action Plan-
5. Resources Required:
Sr.No Name of Resource/Material Specification Quantity Remarks
1. Computer (Desktop/Laptop) i3,RAM 2GB 1
2. Microsoft office word 2010 1
3. Books OS-Three Easy pieces 1
4. Software Turbo C 1
7
PART B-Plan
Title of micro-project: First Come First Serve Scheduling Algorithm
1. Brief Description:
The First Come, First Serve (FCFS) Scheduling Algorithm is a basic CPU scheduling
technique where processes are executed in the order they arrive in the ready queue. It is a non-
preemptive algorithm that ensures fairness by processing tasks sequentially. However, it may
lead to inefficiencies, such as the "convoy effect," where shorter processes are delayed by
longer ones. This microproject involves simulating the algorithm, analyzing its performance
metrics (e.g., waiting time and turnaround time), and understanding its advantages and
drawbacks in CPU scheduling.
3. Course Outcomes:
a. CO-a Install Linux operating system and configure it.
b. CO-b CO Use operating system tools to perform various functions.
c. CO-c Execute process commands for performing process management
operations.
d. CO-d Apply scheduling algorithms to calculate turnaround time
and average waiting time.
e. CO-e Calculate efficiency of different memory management techniques.
f. CO-f Apply file management techniques.
9
10
6. Outputs of the Micro-project:
Introduction:
Scheduling :
➢ The process scheduling is the activity of the process manager that handles the
removal of the running process from the CPU and the selection of another process on
the basis of a particular strategy.
➢ Process scheduling is an essential part of a Multiprogramming operating systems.
➢ Such operating systems allow more than one process to be loaded into the executable
memory at a time and the loaded process shares the CPU using time multiplexing.
• First Come First Served (FCFS) :
➢ First come first serve (FCFS) scheduling algorithm simply schedules the jobs
according to their arrival time.
➢ The job which comes first in the ready queue will get the CPU first.
➢ The lesser the arrival time of the job, the sooner will the job get the CPU.
➢ FCFS scheduling may cause the problem of starvation if the burst time of the first
process is the longest among all the jobs.
Step 1: Input Process Details: Collect the necessary information for each process, including:
Process ID
Arrival Time (AT)
Burst Time (BT)
Step 2: Sort Processes: Arrange all processes in ascending order of their Arrival Times.
Step 3: Arrange all processes in ascending order of their Arrival Times. If two processes have
the same arrival time, maintain the input order.
Step4: Assign CPU to Processes Sequentially:
Start executing processes based on their arrival order:
Assign CPU to the first process in the sorted list.
Compute its Completion Time (CT):
CT=Previous Completion Time+Burst Time of Current ProcessCT = \text{Previous
Completion Time} + \text{Burst Time of Current
Process}CT=Previous Completion Time+Burst Time of Current Process
11
CHARACTERISTICS OF FIRST COME FIRST SERVED (FCFS)
1. Non-Preemptive Nature: Once a process starts executing, it runs to completion without being
interrupted.
2. First-Come Order:Processes are executed in the exact order they arrive in the ready queue.
3. Fairness:Every process gets the CPU based on its arrival time, ensuring no process is skipped or
starved.
4. Convoy Effect: Longer processes can delay shorter ones, leading to inefficient CPU utilization and
increased average waiting time.
ADVANTAGES
1. Simplicity: Easy to implement and understand due to its straightforward logic of scheduling
processes based on arrival time.
2. Fairness: Processes are executed in the exact order of arrival, ensuring no process is skipped or
starved.
3. Deterministic: The results, such as waiting time and turnaround time, are predictable and
consistent for a given set of processes.
4. Non-Starvation: Since every process gets executed in arrival order, no process is left waiting
indefinitely.
5. Suitable for Batch Systems: Ideal for batch processing systems where all jobs are available at the
same time and have similar burst times.
DISADVANTAGE
1. Convoy Effect: Long processes can delay shorter ones, leading to poor overall system
performance and increased waiting times for smaller processes.
2. High Average Waiting Time: Due to the sequential execution, processes with shorter burst
times may experience significant delays if they follow longer processes.
3. Non-Optimal CPU Utilization: The execution order does not consider process burst times,
which may lead to inefficient CPU utilization, especially when short processes are waiting
behind long ones.
4. Not Ideal for Time-Sharing Systems: FCFS is unsuitable for time-sharing or interactive
systems where quick response times are required because it can cause significant delays for
processes that arrive later.
5. Lack of Priority Consideration: The algorithm does not prioritize critical or important
tasks, which might lead to high-priority processes being delayed by low-priority ones.
6. Unfair to Shorter Processes: Short processes can be significantly delayed if they arrive after
a long process, resulting in a potentially unfair scheduling environment for time-sensitive
tasks
12
FIRST COME FIRST SERVE (FCFS) SCHEDULING EXAMPLE:
Ex 1: Let's take an example of The FCFS scheduling algorithm.In the Following schedule, there are 5
processes with process
Solution:
The Turnaround time and the waiting time are calculated by using the following formula
Gannt Chart :
P0
P1
P2
P3
P4 12
13
Turn Around Time = Completion Time - Arrival Time
Waiting Time = Turnaround time - Burst Time
14
PROGRAM :-
#include<stdio.h
>
#include<conio.
h>
int main()
{
int n,bt[20],wt[20],tat[20],avwt=0,avtat=0,i,j;
wt[0]=0;
for(i=1;i<n;i++)
{
wt[i]=0;
for(j=0;j<i;j++)
wt[i]+=bt[j];
}
for(i=0;i<n;i++)
{
tat[i]=bt[i]+wt[i];
avwt+=wt[i];
avtat+=tat[i];
printf("\nP[%d]\t\t%d\t\t%d\t\t%d",i+1,bt[i],wt[i],tat[i]);
}
avwt/
=i;
avtat/=i
;
printf("\n\nAverage Waitng Time: %d",avwt); printf("\
nAverageTurnaround Time: %d",avtat); return 0; }
15
OUTPUT
16
7. Skill Developed:
8. Applications of Microproject:
17