Chapter 3 (Process Description and Control) Flashcards

(61 cards)

1
Q

What are the two states of a process?

A

Running and not running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the OS do when a new process is created?

A

Builds the data structures needed and allocates space in main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the four primary reasons a process is created?

A

New batch job submitted

Interactive logon occurred

OS creates one for some service

Spawning an existing process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

T/F The two state model is adequate

A

F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a problem with the two state model?

A

Requires the dispatcher to search the not-running queue, looking for a process that is not blocked

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What states are in the five state model?

A
Running
Ready
Blocked
New
Exit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Null -> new

A

Process creation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

New -> Ready

A

OS is ready for a new process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Ready -> Running

A

Based on scheduling algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Running -> Exit

A

On termination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Running -> Blocked

A

Service call, I/O request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Blocked -> Ready

A

Waited event occurs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Ready -> Exit

A

Terminated due to parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Blocked -> Exit

A

Terminated due to parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the two suspend states?

A

Blocked/Suspend

Ready/Suspend

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the blocked/suspend state?

A

Suspended and awaiting an event

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the ready/suspend state?

A

Suspended and ready to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Blocked -> Blocked/Suspend

A

To free memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Blocked/Suspend -> Ready/Suspend

A

If event occurs while blocked/suspend

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Ready/Suspend -> Ready

A

If no ready processes, or if suspended process is higher priority than ready queue processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Ready -> Ready/Suspend

A

If need to free up memory and there are no blocked processes, or a ready process if of lower priority than the blocked processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

new -> Ready/Suspend and New -> Ready

A

Could add new process to either queue. Might add to the ready/suspend queue if no room in memory or if desired to let OS setup the new process before loading it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Blocked/Suspend -> Blocked

A

If suspended blocked process has higher priority than any suspended ready process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Running -> Ready/Suspend

A

Rather than returning to the ready queue, could be sent to the ready/suspend to free up memory for some higher priority process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Various -> Exit
If terminates due to normal completion or error, or by parent, or on some systems if parent terminates
26
T/F The suspend state may be used for other occasions besides swapping a process out of memory
T
27
What are the characteristics of a suspended process?
Not immediately available for execution May or may not be waiting on an event Process was suspended by an agent Process stays suspended until the agent activates it
28
What are reasons for suspension?
Swapping OS Reason User request Timing Parent request
29
Why swap for suspension?
To free main memory
30
What is an OS reason for suspension?
OS thinks process is causing a problem (deadlock)
31
What user request would cause a suspension?
To debug
32
Why would timing suspend a process?
If infrequently run
33
Why would a parent request suspend a process?
To examine a child process or its activity
34
What are the 4 categories of information the OS maintains tables of?
Memory tables I/O tables File tables Process tables
35
What does the memory table keep track of?
Allocation of main memory to processes Allocation of secondary memory to processes Protection attributes of blocks of main or virtual memory Information needed to manage virtual memory
36
What do I/O tables keep track of?
Availability of a device Device assignment to a process Device status Operation status Memory being used for a data transfer
37
What do file tables keep track of?
Their location in secondary storage Their status Other file attributes
38
What do process tables keep track of?
Where the process is located Attributes of the process
39
Where is the information the OS needs to control a process located?
Process Control Block (PCB)
40
All of these together are referred to as the process image
User program User data System stack Process Control Block
41
What are the three main parts of the process control block?
Process identification Processor state information Process control information
42
Process identification has numeric ID's for...
The process The parent of the process The user of the process
43
What does the processor state include?
User-visible registers Control and status registers Stack pointers
44
What things are in the scheduling and state information?
Process state Priority Scheduling-related information Event
45
T/F Creating a new process is a relatively short operation
F, relatively lengthy
46
When may a process switch occur?
Anytime the OS gains control again from the current process
47
What may give the OS control again?
Interrupt A trap A supervisor call
48
What is a trap?
Current instruction creates an error
49
What is a supervisor call?
I/O request
50
What are the two kinds of switching?
Mode switch Process switch
51
What is a mode switch?
Switch away from process, for example, to run an interrupt handler
52
What is a process switch?
Switch from one process to another process
53
What is done for a mode switch?
Save context Set PC to interrupt handler Switch from user mode to kernel mode Run interrupt handler
54
What happens upon the return of a mode switch?
Switch from kernel mode back to user mode Set PC to program Restore context
55
What is done for a process switch?
Save context Update PCB of current process to a non-running state Move PCB process to appropriate queue for the state Select another process to run Update PCB of the selected process in the running staate Update memory-management data structures Restore state of newly selected process
56
Does a process switch or mode switch require more work?
Process switch
57
What is the nonprocess kernel approach?
Executes the kernel outside of any process
58
T/F The idea of a process only applies to user programs in a nonprocess kernel approach
T
59
Is a nonprocess kernel approach common on newer or older OS'?
Older
60
In a process-based OS, what two kinds of processes does the OS support?
User processes System processes
61
T/F All processes in a process-based OS can then be managed according to priority with some OS functions being low priority and others being high
T