Help me in Round Robin Algorithem& Shortest remaining time next

Reply

Join Date: Jun 2005
Posts: 1
Reputation: Naseer is an unknown quantity at this point 
Solved Threads: 0
Naseer Naseer is offline Offline
Newbie Poster

Help me in Round Robin Algorithem& Shortest remaining time next

 
0
  #1
Jun 26th, 2005
Use the CPU trace generator to generate jobs (or process) traces and simulate the
following algorithms
1. Shortest remaining time next (aka Shortest Job First with pre-emption,
aka SJF, shortest next burst time).
2. Round-Robin with user set-able time quantum (the time quantum should
be a userset-able command line parameter. Default time quantum is 20 time
units)
[Hint: aka = also known as]
The CPU trace generated by your CPU trace generator must have the following
format:
? numberOfJobs
? JobId_1 [space] arrivalTime [space] numberofIORequests [space] [Priority]
Followed by
? burstTime_1
? burstTime_2
? burstTime_3
? ...
? JobId_2 [space] arrivalTime [space] numberofIORequests [space] [Priority]
Followed by
? burstTime_1
? burstTime_2
? burstTime_3
? ...
? JobId_numberOfJobs [space] arrivalTime [space] numberofIORequests
[space] [Priority]
Followed by
? burstTime_1
? burstTime_2
? burstTime_3
? ...
An example of a trace file is:
2
1 0 3 1
5
60
19
21
2 3 2 2
5
5
7
Your CPU scheduling simulator should read this trace and simulate the algorithms
listed above. You want to test your program with a mix of 2 - 20 jobs and (the
same) two test cases (traces) for each algorithm:
1. Predominantly I/O bound jobs (interactive)
2. Predominantly CPU bound jobs (batch)
Your simulation should output the following statistics
• Average throughput measured in jobs per time unit
• Average turnaround time measured in time units
• Average waiting time measured in time units
Predominantly I/O bound jobs means the main part of this process/job will be
I/O based. It means the most of the execution time of that process will require
Input/Output from/to user and vise versa for Predominantly CPU bound jobs�.


Clarification:
You are required to submit 3 files; each should accept the following command line
Parameters:
* If not specified, then default quantum size = 20
Trace File
• We are not simulating I/O burst times
• Priority has been excluded
• The ranges for generated values are as follows:
o No. of jobs: Random number between 2 and 20
o Arrival time: There should be between 0-20 time units between job
arrivals
o No. of I/O Requests: Random number between 1 and 20
o No. of CPU Bursts: # of I/O Requests + 1
o Burst Duration: Random number between 1 and 100
(Please note: I/O bound processes will have shorter bursts on average
then CPU bound processes)
An example of a trace file is:
2
1 0 2
5
60
19
2 3 1
5 5
Shortest Remaining Time First
If a process P1 is running and a new process enter the ready queue, allow P1 to
run again, i.e. include it in the processes in contention.
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Help me in Round Robin Algorithem& Shortest remaining time next

 
0
  #2
Jun 30th, 2005
Please post your own work. This is a homework assignment-- it's obvious from the way it's phrased.
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC