CIS343|510
Chapter Three Review w/ Answers1. We can characterize the behavior of an individual process by listing the
sequence of instructions that execute for that process. Such a listing is
referred to as a _____ of the process.
trace
2.
Draw the diagram of a 5-state process model, labeling all the arcs.See Stallings Fig. 3.5, p. 109
3. Briefly state a reason for swapping (moving part or all of a process from
main memory to disk).
Because processor is so much faster than I/O it will be common for
all processes in memory to be waiting for I/O.
4. With the use of swapping, one other state must be added to the 5-state
model, namely the _____ state.
suspend
Identify the process states described below:
5.
The process cannot execute until some event occurs.Blocked
6.
The process is in secondary memory and is available for execution (assoon as it is loaded into main memory).
Ready, suspend
7.
The process has been released from the pool of executable processes.Exit
8.
The process is currently being executed.Running
9.
The process has been created but has not yet been admitted to the pool ofexecutable processes.
New
10.
The process is in secondary memory and awating an event.Blocked, suspend
11.
The process is prepared to execute.Ready
Identify these reasons for process termination.
12. The process attempts to use an instruction reserved for the OS.
privileged instruction
13.
The process is terminated by its parent process.parent request
14.
The process executes an OS service call to indicate that it has completedrunning.
normal completion
15.
The process attempts a prohibited computation (e.g., divide by zero).arithmetic error
16.
A piece of data is of the wrong type, or is not initialized.data misuse
17.
The process has run longer than the specified total time limit.time limit exceeded
18.
The parent process terminates.parent temination
19.
The process attempts to use a resource or file it is not allowed to use, orto use it in an improper fashion.
protection error
20.
The process is teminated by the operator or the OS.operator or OS intervention
21.
The process has waited longer than specified maximum for a certain eventtime overrun
22.
The process attempts to execute a nonexistent instruction.invalid instruction
23.
The process attempts to access memory location it is not allowed toaccess.
bounds violation
24.
An error occurs during input or output.I/O failure
25.
The process requires more memory than the system can provide.memory unavailable
26. In Figure 3.8(b), why is there a dotted line between the states
Running and Ready, Suspend?It is an action that OS would not normally take
(see Stallings, p. 123)
27.
Which of the states in Figure 3.8(b) represent processes which have beenallocated main memory?
Ready, Running, Blocked
28.
Which represent processes currently in secondary memory?Blocked, suspend & Ready, suspend
29.
What is the advantage of the process models of Figure 3.8(a) or (b) over the model of Figure 3.5?Processes do not sit on memory that they cannot use
31. T/F:
The use of virtual memory eliminates the need for swapping (use of the suspend state(s)). Why?False; virtual memory can collapse if there are too many active
processes
32.
The data needed by the OS to control a process is contained in the ...process control block
33.
List the typical elements of a process image.user data, user program, system stack, pcb
34.
List the 3 categories of information contained in the process controlblock.
process identification, processor state information,
process control information
35.
List the 4 categories of functions performed by the OS kernel.process mgmt, memory mgmt, i/o mgmt, support functions
36.
List 3 mechanisms for interrupting the execution of a process.interrupt, trap, supervisor call
37.
List 3 examples of interrupts.clock interrupt, i/o interrupt, memory fault
38.
List 3 approaches to OS execution.nonprocess kernel, execution within user process,
process-based OS