Home - dverenna/osproj2 GitHub Wiki
The goal of this project is to develop a C++ simulator that assigns 40 processes to processors, but only if memory is available. This project has three main components, the processes, the processors, and memory management strategies and there are four scenarios our program must successfully schedule to be viewed as a success. We will start by examining the several components of our program.
Process:
- There are 40 total processes.
- Each process must have a different runtime requirement.
- Each process should have a Service time randomly assigned with a range of 10 * 10^6 cycles to 10 * 10 ^12 cycles.
- Each process should have a randomly assigned Memory requirement.
- The total memory requirement for all 40 processes must equal 10 MB and a process cannot have a memory requirement less than 1KB.
- Every 100 cycles a random process will be ready to load into memory.
Processor:
- There are 4 total processors.
- Each processor's clock speed is 3GHz.
- In the first and second scenarios, each processor has 10 MB of memory.
- In the third scenario, the four processors have a combined memory of 5MB.
- In the fourth scenario, the four processors have a combined memory of 1MB.
Memory Management Strategy:
- In the first scenario, we will be implementing the FIFO scheduling.
- In scenarios 2-4, we will be implementing First-fit scheduling.
The 4 scenarios are described below:
Scenario 1:
- A total of 10 MB of memory is allocated to our simulator.
- We will be using FIFO scheduling.
- We need to keep track of the total time until the scheduling is finished.
Scenario 2:
- A total of 10 MB of memory is allocated to our simulator.
- We have to choose between Best-fit, Worst-fit, First-fit, Next-fit memory management strategies.
- We have chosen First-fit as a strategy to implement.
- Our algorithm must keep track of allocated memory and holes for it be successful.
- We need to keep track of the total time until the scheduling is finished.
Scenario 3:
- A total of 5 MB of memory is allocated to our simulator.
- We will be using the Next-fit memory management strategy.
- If a process requires too much memory then there is available, it will be put into a separate queue.
- If a process requires more memory than 5 MB, then it will be rejected and added to a rejection queue.
- We need to keep track of the total time until the scheduling is finished.
Scenario 4:
- A total of 1 MB of memory is allocated to our simulator.
- This scenario is the same as scenario 3, besides the amount of memory that is allocated to our simulator.