{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

program 6 - ECE 231 Program 6 Due Tuesday Background We now...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 231 Program 6 Due: Tuesday, February 27, 2007 Background: We now turn our attention to modeling the notion of a process. A process represents a program that is loaded into the computer’s memory and is available for execution. Modern operating systems allow for many processes to be active at any given time. Each process has it’s own block of memory for its stack, heap, code and other storage. Each process also gets its share of CPU time, during which it uses the CPU’s registers (accumulator, index registers, status register, etc.). When a process is not executing (e.g., when it is waiting for a device or just temporarily swapped out), the current values in all its registers are saved so that the next time the process gets to use the CPU the last state of that process, including all the register values, can be restored. Recall the figure from the project overview: When a process is running, the function corresponding to the top-most stack frame in that process is retrieving values from and storing values into its local variables and parameters and, of course, also the accumulator register. Recall that the parameters are stored (in reverse order) at memory addresses that are lower than the stack frame pointer, and local variables are stored at memory addresses higher than the stack frame pointer. Put another way, relative to the stack frame pointer, which recall points to the middle of the frame, parameters have negative offsets and local variables have positive offsets. process 0 – UNIX READY process 1 – user WAITING process 2 – user RUNNING process 3 – user READY memory for process 0 memory for process 1 memory for process 2 memory for process 3
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Assignment: Add a new class, called process, to your project.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}