Processes


First-Come First-Serve (FCFS)



Download 0.57 Mb.
Page6/7
Date02.08.2022
Size0.57 Mb.
#59263
1   2   3   4   5   6   7
Lecture 2 Processes
Lecture 1 Introduction

First-Come First-Serve (FCFS)

Exercise

  • Calculate the turn around time, waiting time, average turnaround time, average waiting time, throughput and processor utilisation for the given set of processes that arrive at a given arrive time shown in the table, with the length of processing time given in milliseconds:
  • If the processes arrives as per the arrival time, the Gantt chart will be:

Shortest Job First (SJF)

  • Also known shortest job next
  • This is a non-pre-emptive type of scheduling
  • Best approach to minimize waiting time
  • The processor should know in advance how much time the process will take
  • Easy to implement in Batch systems where required CPU time is known in advance
  • Impossible to implement in interactive systems where required CPU time is not known

Exercise

  • Consider the following set of processes with the following processing time which arrived at the same time.
  • Using SJF scheduling the shortest length of process will first get execution, the Gantt chart will be:

Process

Process Time

P1

06

P2

08

P3

07

P4

03

Round Robin (RR)

  • Is a pre-emptive process scheduling algorithm
  • Each process is provided a fixed time to execute known as a Quantum
  • Once a process is executed for a given time period, it is pre-empted and other process executes for a given time period
  • No process can run for more than on quantum while others are waiting in the ready queue
  • Primarily used in time-sharing and multiuser system environment

Download 0.57 Mb.

Share with your friends:
1   2   3   4   5   6   7




The database is protected by copyright ©ininet.org 2024
send message

    Main page