Essay on Ecet 360 Lab 3 of 7: Process Management Simulation
Click Link Below To Buy:
L A B O V E R V I E W
Process Management Simulation (Part 3 of 3)
The objective of this three section lab is to simulate four process management functions: process creation, replacing the current process image with a new process image, process state transition,and process scheduling.
This lab will be due over the first three weeks of this course. The commander process program is due in Week 1. This program will introduce the student to system calls and other basic operating system functions. The process manager functions process creation, replacing the …show more content…
A simulated process program consists of a sequence of instructions. There are seven types of instructions as follows:
1. S n: Set the value of the integer variable to n, where n is an integer.
2. A n: Add n to the value of the integer variable, where n is an integer.
3. D n: Subtract n from the value of the integer variable, where n is an integer.
4. B: Block this simulated process.
5. E: Terminate this simulated process.
6. F n: Create a new (simulated) process. The new (simulated) process is an exact copy of the parent (simulated) process. The new (simulated) process executes from the instruction immediately after this (F) instruction, while the parent (simulated) process continues its execution n instructions after the next instruction.
7. R filename: Replace the program of the simulated process with the program in the file filename, and set program counter to the first instruction of this new program.
An example of a program for a simulated process is as follows:
You may store the program of a simulated process in an array, with one array entry for each instruction.