I am trying to do my term project for my Operating Systems class but I am just lost and do not know what direction to go. I am NOT asking for someone to do it for me, I just simply want someone to give me an idea as to how to approach it. Thank you.
Project:
In this project you will investigate the performance of Job Scheduling strategies, Memory Allocation strategies and a CPU Scheduling strategy used by a hypothetical operating system (HOS). The computer system that runs this HOS has four identical processors so that four ready processes can execute truly in parallel. The HOS uses multiprogramming to multiplex the four processors amongst all the memory-resident jobs. The physical memory space is divided into several segments of varying sizes and the allocation strategy uses contiguous allocation of memory space to the waiting processes. Each user program runs in a single segment. Any unused space of an allocated segment is considered wasted.
Memory space requirement and CPU time requirement of all the jobs will be randomly generated: this data essentially constitutes the “Job Queue” or “Input Queue”. The HOS allocates memory to as many jobs as possible based on the scheduling and allocation strategies. It then starts their execution. These jobs remain in memory until completion (no preemption.). When one or more jobs finish, the HOS brings in additional jobs from the job queue based on the same scheduling and allocation strategies.
The following information will be needed to run the simulation:
1. You will need to identify and keep current the following information on each job:
a. Job identification number
b. Memory request (in MB)
c. Execution time request
d. Memory assigned (segment number)
e. Execution time remaining (initially same as item c.)
f. Job status: Waiting, Ready, Running, & Finished
2. You will need to maintain the following information on memory:
a. Segment number
b. Size in megabytes (MB)
c. Whether the segment is in use or not
d. Wasted space (MB)
3. The physical memory of size 256 megabytes is partitioned into seven memory blocks as indicated in the table below.
Fixed-Size Memory Segments
Segment Number Size in MB
0 32
1 48
2 24
3 16 4 64
5 40
6 32
4. The input for the simulation will be the memory request and execution time request of a sequence of jobs. To generate input, use the random number generator Math.random() or Random class provided by Java. Use calls to the random number generator to input a job. Assume that memory requests (in MB) are randomly distributed in the range (12 - 50) and time requests are in the range (2 - 10). You should generate 20 jobs, all assumed to have an arrival time of 0 (zero). For job identification, you number the jobs 1 to 20, in order, as they are generated. We will assume that the simulation will run for 30 time units.
5. For the sake of simplicity, we will assume that all execution times are in multiples of one time slice unit. We will assume true parallel processing of jobs and thus, during each time slice, take one time unit off the time remaining for four of the active jobs. To be fair to all the jobs in the ready queue, you need to schedule the ready jobs in a round robin fashion.
The output should include the following:
For every unit of time, output the events that occurred in that time unit
TIME ID SEGMENT MEM REQUEST TIME REMAIN MESSAGES
… … … … … …
5 8 1 40 5 running
5 11 5 30 3 running
5 12 0 30 4 ready
5 7 -1 45 8 waiting
… … … … … …
20 20 1 40 7 ready
20 15 0 30 4 running
20 13 -1 50 0 finished
At the end of each time step, output the number of jobs that are waiting and the total memory wasted. At the end of the simulation, output the total number of jobs completed.
You need to do simulation for the following three cases (all three should use the same test data.) Compare and explain the results from the three cases.
Case One
Jobs are moved from the job queue to the ready queue in First-Come First-Served order and
using the First-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.
Case Two
Jobs are moved from the job queue to the ready queue in First-Come First-Served order and
using the Best-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.
Case Three
Jobs are moved from the job queue to the ready queue in Shortest-Job First-Served order (shortest means smallest execution time) and using the Best-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.
DELIVERABLES AND OTHER EXPECTATIONS
1. You may work on this project as a team of two students. You should let me know who will be your team partner by 11th March (Tuesday) class time. For any reason you encounter problems with your team-mate, it is your responsibility to complete the project on your own & then submit the deliverables under your name only.
2. A detailed, well-written, professional design document describing your assumptions, data structure choices and algorithm strategies used in the project. It should include the top-down design details of your program logic. It should also include a conclusion section discussing the observed results. A one page preamble to the design document should describe the breakdown of work: which parts of the project you both worked on, which parts you worked on individually, and how you integrated all parts. Spelling and grammar mistakes will be penalized.
3. Your Java source code files must be well-commented & well structured and should include the names of the team partners.
4. Hardcopy of all source code files used in the project and hardcopy of all the results from your program are due to the instructor by the due date time. Format the results so that they are concise and readable.
5. Create a README text file that shows the name and purpose of each of the Java source file belonging to your project. The README file also should inform the instructor how to compile/run your program and where to find the program results.
6. Put all the files belonging to your project in a folder named P_XX_YY where XX and YY stand for first & last initials of the two team members. Post the zip file of this folder to the appropriate Blackboard location by the due date time.