Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Department of Information Technology

Faculty of Engineering and Technology


University of Sindh Jamshoro

LAB # 4
BS (Information Technology) Part-III
SENG- 529 Operating Systems
Student Name________________________________ Role No___________________________

LAB OBJECTIVE: Understanding and Implementing FCFS scheduling Algorithms

TOOLS REQUIRED: Intel based Desktop Pc RAM of 512 MB, Programming


Environment (C,C++, Java)
TERMINOLOGIES:
CPU Scheduling
Aim is to assign processes to be executed by the processor in a way that meets system
objectives, such as response time, throughput, and processor efficiency. It is broken down into
three separate functions, long term scheduling, medium term scheduling and short-term
scheduling respectively
Short term scheduler
 Short term scheduler selects process from ready queue and assigns it to processor for
execution.
 The short-term scheduler selects process based on implemented scheduling algorithm
First Come First Serve Scheduling Algorithm: Selects process from ready queue according to
their order of arrival
EXERCISE
Following are given textual algorithms for FSCS scheduling algorithm. Compute Waiting time,
Average waiting time and Turn Around Time (TAT) for processes entered by user.
FCFS ALGORITHM

1. Start
2. Declare the array size
3. Read the number of processes to be inserted
4. Read the Burst times of processes
5. calculate the waiting time of each process
wt[i+1]=bt[i]+wt[i]
6. calculate the turnaround time of each process
tt[i+1]=tt[i]+bt[i+1]
7. Calculate the average waiting time and average turnaround time.
8. Display the values
9. Stop

You might also like