Your IP : 216.73.216.40


Current Path : /var/www/html/bibhas.ghoshal/lab_files/
Upload File :
Current File : /var/www/html/bibhas.ghoshal/lab_files/Scheduling_Algorithms.html

<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html><head>
   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
   <meta name="Author" content="Terry Scott">
   <meta name="GENERATOR" content="Mozilla/4.78 [en] (Win98; U) [Netscape]">
   <title>Lab 4 - Scheduling Algorithms</title>
</head>
<body background="CS%20440%20Lab%203%20-%20Scheduling%20Algorithms_files/mathback.gif">

<center><b><font size="+1">Lab 4 - Process Scheduling Algorithms</font></b></center>
<b>OBJECTIVES:</b>
<ul>
<li>
To learn more about process scheduling algorithms</li>

<li>
Have more experience with queues, linked lists, or trees.</li>

<li>
Perhaps gain insight into which algorithms are best under which circumstances.</li>
</ul>
<b>INTRODUCTION:</b>
<br>Each person will be assigned a scheduling algorithm to program. However, implementation of FCFS is compulsory for all. The
program will read from a file which the program will have to prompt for.
In this file will be a list of processes with pertinent data for the process.
The program will simulate the execution of the processes. It will print
out the time it takes each process to complete called the turn around time
and the wait time. and compute the average turn around time for all processes
to execute.
<p><b>DETAILS:</b>
<br>The time slice if required for your algorithm will be 3. You may assume
that a swap is small enough that it can be ignored. The file containing
the information on the processes will have each process on a separate line.
The processes will be in the file in the order in which they arrive at
the OS. Each line will have a process name that will be a string. Following
that will be the arrival time of the process. The arrival time will be
in reference to the previous process. Following this will be the total
execution time. Next will be the priority of the process as an integer (smaller values will
have higher priority). It will look like this
</p><p><tt>P1 0 20.0 2</tt>
<br><tt>P2 2 15.0 1</tt>
<br><tt>P3 6 27.0 4</tt>
<br><tt>p4 4 36.0 3</tt>
<br>. . . .
<br>. . . .
<br>. . . .
<br>xx
</p><p>The xx indicates the end of the data.
</p><p>The algorithms will be:
</p><ol>
<li>
FCFS - no preemption</li>

<li>
SJF - without preemption</li>

<li>
Priority based Scheduling </li>

<li>
Round Robin</li>


</ol>
<b>INPUTS:</b>
<br>A filename from the keyboard, read the file for the pertinent data,
and a possible time slice size (depending on which algorithm is used)..
<p><b>OUTPUTS:</b>
<br>A prompt for which file is to be read. A prompt for the amount of time
for a time-slice. A list of each process and the time it took for it to
complete. Then an average time for processes to complete. 

</p><p><b>EXAMPLE: </b>(The bold faced values are user typed values. Your program
need not reproduce this.)
<br>This program simulates the FCFS scheduling algorithm.
<br>The name of the file to be read: <b>A:\lab1.data</b>
<br>process name&nbsp;&nbsp;&nbsp; turn around time&nbsp;&nbsp;&nbsp; total
wait time
<br>??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
?????
<br>??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
?????
<br>. 
.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.
 . ..
<br>. . .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
. . .
<br>. . .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
. . .
<br>The average time for processes to complete was ???

</p><p><b>DETAILS:</b>
<br>You can use whatever language you wish (preferably C). Include a printed version of the
source code. We will discuss in class
which algorithm goes with which person.
</p><p><b>EXTRA CREDIT:</b>
<br>A graphical display of the Gantt chart for the operations would be
worth more points. 


</p></body></html>