0% found this document useful (0 votes)
5 views2 pages

Input Numerical-1

The document outlines the execution of three processes (P1, P2, P3) using Shortest Job First (SJF) and Priority Scheduling algorithms. For SJF, the average waiting time is 1.67 and the average turnaround time is 5.67, while for Priority Scheduling, the average waiting time is 3.33 and the average turnaround time is 7.33. The processes are analyzed based on their arrival times, burst times, and priorities.

Uploaded by

hvzc5vy80z
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Input Numerical-1

The document outlines the execution of three processes (P1, P2, P3) using Shortest Job First (SJF) and Priority Scheduling algorithms. For SJF, the average waiting time is 1.67 and the average turnaround time is 5.67, while for Priority Scheduling, the average waiting time is 3.33 and the average turnaround time is 7.33. The processes are analyzed based on their arrival times, burst times, and priorities.

Uploaded by

hvzc5vy80z
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

INPUT NUMERICAL

Consider following set of processes for executing practical No:04, 05 and 06

Process Arrival-Time Burst Time Priority


P1 0 8 2
P2 0 3 1
P3 0 1 3

Calculate average waiting time and average turnaround time for all these process using SJF and Priority
Scheduling algorithm?

/////////////////////////////////////////////////////////////////////////////////////////////

EXPECTED OUTPUT(SJF)

Enter the number of process:3

Enter process name, arrival time & execution time:p1 0 8

Enter process name, arrival time & execution time:p2 0 3

Enter process name, arrival time & execution time:p3 0 1

Pname arrivaltime executiontime waitingtime tatime

p3 0 1 0 1

p2 0 3 1 4

p1 0 8 4 12

Average waiting time is:1.666667

Average turnaroundtime is:5.666667

/////////////////////////////////////////////////////////////////////////////////////////////

EXPECTED OUTPUT(Priority)

Enter the number of process: 3

Enter process name,arrivaltime,execution time & priority:p1 0 8 2

Enter process name,arrivaltime,execution time & priority:p2 0 3 1

Enter process name,arrivaltime,execution time & priority:p3 0 1 3


Pname arrivaltime executiontime priority waitingtime tatime

p3 0 1 3 0 1

p1 0 8 2 1 9

p2 0 3 1 9 12

Average waiting time is:3.333333

Average turnaroundtime is:7.333333

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy