-
From a processors point of view, processes _?_
- execute an instruction dictated by program counter.
- interleaves the execution of various proceses
-
From an individual program's point of view processes _?_
execute a sequence of instructions within that program.
-
Name the eight process elements commonly found in the Process Control Block:
- Identifier
- State
- PriorityProgram
- Counter
- Memory Pointers
- Context Data
- I/O Status Information
- Accounting Information
-
Two essential elements of a process are:
- Program code
- A set of data associated with that code.
-
The Process Control Block contains _?_
the process elements
-
The Process Control Block makes it possible to:
interupt a running process anlater resume execution as if the interruption had not occurred.
-
The Process Control Block is created and managed by the _?_
Operating System
-
Three things the Process Control Block "is"
The process control block is:
- included in the context along with the stack
- a snapshot that contains all necessary and suffiecient data to restart the process where it left off(ID, state, CPU registers, etc.)
- one entry in the the operating systems process table (array or linked list)
-
The most fundamental concept in a modern OS is the _?_
process
-
The principal function of the OS is to:
create, manage, and terminate processes.
-
Process control block contains
all of the information that is required for the OS to manage the process.
-
List of the information that is required for the OS to manage the process
- current state
- resources allocated to it
- priority
- plus other relevant data
-
The most important states of a process are:
-
The running process is
the one that is currently being executed by the processor
-
A blocked process is waiting for:
the completion of some event
-
A running process is interrupted either by (two things):
- an interrupt
- executing a supervisor call to the OS.
-
Draw a simple process control block:
-
Process Conrol Block: Draw or describe a typical process image implementation.
-
Process States: Trace:
The behavior of an individual process by listing the sequence of instructions that execute for that process
-
Process States:Dispatcher:
- Small program that switches the processor from one process to another.
-
Two-State Process Model is....
A process model that may be in one of two states:
-
Draw a state transistion diagram for the Two State Process Model:
-
List the reasons Process Creation (4):
- New batch job
- Interactive logon
- Created by OS to provide a service
- Spawned by existing processes
-
When the OS creates a process at the explict request of another process it is known as:
Process Spawning
-
Parent process; in the context of process creation is:
the original creating process.
-
Child Process; in the context of process creation is:
The new process created by the parent process.
-
In the context of fork()ing and exec()ing a process. what happens when you fork a process?
When you fork() a process it makes a clone of the parent:
-
In the context of fork()ing and exec()ing a process. what happens when you exec the new child process?
The clone is replaced with a new context, data and program:
-
Process Termination two examples:
1. Batch job should have a halt instruction or explicit OS service call.
2. Interactive application --> determined by action of the user (e.g. log off quitting the app).
-
Reasons for a process termination:
- Normal completion
- Time Limit exceeded
- Memory Unavailable
-
5 State Process Model: Name the transitions:
- 1=Admit
- 2=Dispatch
- 3=Release
- 4=Timeout
- 5=Event Wait
- 6=Event Occurs
-
5 State Process Model: Name the 5 steps:
-
1=New
- 2=Ready
- 3=Running
- 4=Exit
- 5=Blocked
-
Two problems with the "Blocked/Ready" model are:
- Blocked processes are taking up memory space
- A hungry CPU might soon run out of ready processes in memory.
-
Define Swapping:
- Moving part of / all of a process from main memory to disk.
- When none of the process in main memory is in the READY state, the OS swaps one of the blocked processes out onto disk -- into a suspend queue
-
What solves the problems of the "Blocked/Ready" model?
Swapping out processes from main memory to disk and putting them into a suspended state.
-
4 Characteristics of a Suspended Process:
- The process is not immediately available for execution.
- The process was placed in a supended state by an agent.
- The process may or may not be waiting on an event.
- The process may not be removed from this state until the agent explictily orders the removal.
-
In the context of a suspended process what is an agent?
The thing that acted on placing a process in a suspended state.It can be a process; parent or itself, or the OS.
-
Other than needed main memory release, what are some other reasons for suspending a process?
- OS suspends a process that may be causing a problem
- User may wish to suspend execution to debugging or in connection with the use of a resource.
- Timing -- a process maybe exec. periodically and maybe suspended while waiting for the next time interval.
- Parent Process Req -- parent may suspend exec of a decendent to examine or modify the suspended process.
-
Name some OS Control Tables
- I/O Tables
- Memory Tables
- File Tables
- Process Tables
-
OS Control Tables: I/O Tables do what?
Keeps track of, or manages I/O devices and channels of the computer system.
-
The OS control tables responsible for managing I/O devices (I/O Tables) typical tasks:
- I/O device availability
- I/O in progress info: status of I/O operation and location of main memory used as the source and destination of the I/O trasition.
-
OS Control Tables: Memory Tables must include:
- allocation of main memory to processes
- allocation of secondary memory to processes
- protection attributes of blocks of main or virual memory
- info needed to mamage virual memory
-
OS Control Tables: File Tables hold information regarding:
- existance of files
- location of files on secondary memory
- current status of files
- and other attributes.
-
OS Control Tables: Process Tables
- Manage Processes
- Provide reference to memory, I/O , and files: directly and indirectly
- Must be acessible by the OS and therefore are subject to memory management.
-
Process Control Structures: To manage and control a process the OS must know:
- Where the process is located
- The attributes of the the process that are necessary for its management.
|
|