Assignment problem c in Linux

Closed Thread

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

Assignment problem c in Linux

 
0
  #1
Jul 5th, 2005
This is My Assignment and i not do this completely please try to solve it.

After the completion of this assignment you’ll be able to:
Understand and implement the CPU scheduling algorithms and comprehending the
power of simulation in evaluating competing algorithms.
There are two portions to the assignment:
• Design and implement a CPU trace generator (20%)
• Design and implement a CPU Scheduling Simulator (80%)
Description:
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.

NOTE: You can get this Assignment from the followingLink
http://www.cse.unr.edu/~sushil/class/os/assignments/s04/as4/
After Solving can Mail in my email Address email link removed
Last edited by Catweazle; Jul 5th, 2005 at 10:35 am.
Quick reply to this message  
Join Date: Mar 2004
Posts: 3,826
Reputation: Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough 
Solved Threads: 144
Team Colleague
Catweazle Catweazle is offline Offline
Grandad

Re: Assignment problem c in Linux

 
0
  #2
Jul 5th, 2005
Hi Awais,

For starters this forum section is for introductions, not for asking technical questions.

For seconds, even if you post this in the appropriate forum section, no-one will help you because you're asking someone to do your homework for you! That's cheating, and everyone here knows it!

If you do the work yourself, and then ask questions about the parts where you are stuck or having problems, you'll most likely get help. But we don't do the work for you.

And we don't allow email links for answers.
Quick reply to this message  
Closed Thread

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



Similar Threads
Other Threads in the Community Introductions Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC