| | |
Assignment problem c in Linux
![]() |
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Solved Threads: 0
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
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.
•
•
Join Date: Mar 2004
Posts: 3,826
Reputation:
Solved Threads: 144
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.
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.
![]() |
Similar Threads
- What's better? Windows 2000 Server or Linux Server? (Windows Servers and IIS)
- Vista Networking Problem With Linux DHCP (Windows Vista and Windows 7)
- i want help about the Simulate a Linux/UNIX shell, called MASH in the C (C)
- Samba writing stall error; linux to linux transfer (*nix Software)
- Linux vs. Microsoft Windows (IT Professionals' Lounge)
- Problem in using Linux applications (*nix Software)
Other Threads in the Community Introductions Forum
- Previous Thread: Hello from Thugzappa
- Next Thread: New Kid stumbles in
| Thread Tools | Search this Thread |
aladar amatueurgrapicdesigner beginner business c# c#picturebox c++ champlain college contentwriting copywriter dba deleterectangle dheeraj experiences forensic givemetehcodez helloall internet internetmarketing introduction introductory itservices jauhari java lahore.civilengineer marketing mca multiplerectangle naveen newbie newcomernote newgirl nigeria note oil online peertopeervideostreaming pekdi pictureboxselectobject prankerio profanitytest projects seo seoservices share shiva..... sqlserver stillnew student suthar tester traffic typhoon waliya'sgratituteandrequest. webcam webdesign welcomenote wllu wolf wordpresstheme





