Program 6 - ECE 231 Program 6 Due Tuesday Background We now turn our attention to modeling the notion of a process A process represents a program

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 DocumentRight Arrow Icon
Assignment: Add a new class, called process, to your project. This class should include the following
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.

This note was uploaded on 10/14/2009 for the course EECS 231 taught by Professor Henchen during the Winter '09 term at Northwestern.

Page1 / 4

Program 6 - ECE 231 Program 6 Due Tuesday Background We now turn our attention to modeling the notion of a process A process represents a program

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online