You will submitt printout of your code along with sample output.
•There will be discussion on your work. All group members must be there.
Introduction:
It is required in this assignment, to write a program in Java that simulates the behavior of the multiprogramming operating system. At the end of the simulation, you are expected to output some statistics regarding the behavior of the system. In the following sections, we will introduce the hardware specification, the multiprogramming OS features and the jobs requirements.
Hardware:
The computer hardware is assumed to have:
1. A hard disk of size of 10 GB where 1/5 of this size is used to store the user programs.
2. A RAM of size 192MB, where 32MB is used to store the OS.
3. A CPU that executes one instruction each unit of time.
4. An IO device for input and output operations.
5. An internal clock that ticks every unit of time.
Operating System:
The operating system is the multiprogramming OS. We would be interested in only 2 features in this simulation: The Job and CPU scheduling.
1. Job Scheduling: The program with the smallest size is first selected to be loaded in the main memory. We call this technique by SSPF.
2. CPU scheduling: The CPU is allocated to the program with the smallest expected running time. We call this technique by SETF.
Program specifications:
Each program has 2 main requirements: A program size in KB and an expected execution time. Of course, the expected execution time is greater or equal to the exact execution time. In addition, each program should have an Id and state. The student should specify any extra information that is required by the simulation.
1. The memory sizes are uniformly distributed between 16KB and 16384KB
2. The expected execution time is also distributed between 16 ut and 512 ut.
Initialization phase:
You should perform the following steps before running the simulation:
1. Generate enough programs with random memory size and random expected execution time so to fill the hard disk. (Σ Program sizes ≤ 2 GB)
2. Load the RAM with the maximum number of user programs.
3. Start the simulation run which consists of a simulation of the Machine Execution Cycle.
The Machine Execution Cycle:
The following algorithm simulates the machine Execution Cycle:
MEC algorithm:
While true do {
Increments the simulated clock by one unit of time
(* This assumes that one instruction is executed *)
If there are interrupts
Then Interrupts the current program and calls the ISRi
endif
}
Interrupts are also randomly generated:
1. The possibility that there are interrupts is 10%
2. The possibility that there is an IO request is 20%
3. The possibility that the busy IO device will terminate is 20%
4. The possibility that the program terminates normally is 5%
5. The possibility that the program terminates abnormally is 1%
The main simulator program is like this:
Initialize the simulation
While there are jobs in the H-Disk do {
Run the Machine Execution Cycle
}
Print the required statistics
Output from the simulation:
At the end of the simulation, you should print the following results:
[login to view URL] number of initially generated jobs stored on the H-disk.
[login to view URL] average program size of all jobs.
[login to view URL] average number of jobs that have completed their execution normally.
[login to view URL] average number of jobs that have completed their execution abnormally.
[login to view URL] number of CPU bound jobs.
Hi I am Dinh. I done some similar project. you can see it in here
https://www.freelancer.com/jobs/CPlusPlus-Programming/Process-Scheduling/
https://www.freelancer.com/jobs/Java/executable-design/
https://www.freelancer.com/jobs/C-Programming/Memory-Management/
Hope to work with you.
$150 USD in 3 days
4.9 (48 reviews)
5.2
5.2
8 freelancers are bidding on average $195 USD for this job