CH3 Flashcards

Processes (94 cards)

1
Q

a program in execution; process execution must progress in sequential fashion

A

Process

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

_________ is the part of the process which is the program code.

A

Text section

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

_________ is the process part which contains temporary data such as function parameters, return addresses, and local variables.

A

Stack

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

__________ is the process part which contains global variables, arrays, etc.

A

Data section

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

________ is the process part which contains the memory dynamically allocating during run time.

A

Heap

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

Program is (passive/active) entity stored on disk (executable file), process is (passive/active).

A

Program is passive.
process is active.

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

Program becomes ________ when executable file loaded into memory.

A

process

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

T/F: Execution of program started via GUI mouse clicks, command line entry of its name, etc.

A

True

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

T/F: Each program can only be one process.

A

f, one program can be several processes; consider multiple users executing the same program

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

A process needs to consist of four segments to be in memory: ________ segment, _______ segment, ________ segment, and __________ segment.

A

stack, heap, data, text.

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

In a single-CPU system, only one process may be in ________ state.

A

running; many processes may be in ready and waiting states.

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

As a process executes, it changes state into ________ when the process in being created.

A

new

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

As a process executes, it changes state into ________ when instructions are being executed.

A

running

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

As a process executes, it changes state into ________ when the process is waiting for some event to occur.

A

waiting

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

As a process executes, it changes state into ________, when the process is waiting to be assigned to a processor.

A

ready

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

As a process executes, it changes state into ________, when the process has finished execution.

A

terminated

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

Process state change cycle continues until the process exists, falls, or is terminated, moves to _________ state.

A

terminated

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

If the process is running and the core is needed (say for an interrupts), the process will return back to the __________ state.

A

ready

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

The process is scheduled onto a core, when the core is available, it is now in a __________ state.

A

running

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

Information associated with each process is called ___________

A

Task Control Block

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

The Process Control Block (PCB) includes information about each process such as the process state, program ________, CPU _______, CPU ________ information, ___________ information, ____________ information, and ___________ status information.

A

program counter, CPU registers, CPU scheduling information, memory-management information, accounting information, I/O status information.

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

The _________ indicates the location of the instruction to next execute.

A

Program Counter

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

The ___________ shows the memory allocated to the process.

A

Memory-management information

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

The __________ are the contents of all process-centric registers.

A

CPU registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The ____________ includes the priorities, scheduling queue pointers.
CPU scheduling information
26
The ______________ indicates how much CPU used, clock time elapsed since start, and time limits.
Accounting information.
27
The ______________ includes I/O devices allocated to process, and list of open files.
I/O status information
28
___________ occurs when the CPU switches to another process, so the system must save the state of the old process, and load the saved state for the new process.
Context Switch
29
T/F: The context of a process is represented in the PCB.
True.
30
Context-switch time is _________.
Overhead. (meaning the system does no useful work while switching.)
31
T/F: The higher complex the OS and the PCB, the faster the context switch.
F, the more complex the longer (slower) context switch.
32
T/F: Context switching is time dependent on hardware support.
True. (Some hardware providdes multiple sets of registers per CPU, which leads to multiple contexts loaded at once.)
33
During a context switch from P0 to P1, P0 will receive a _____________ or ________ while executing, which leads P1 to change from an idle state to a state of execution.
System call, interruption
34
During a context switch from P0 to P1, the OS will _____________ into PCB__ and ___________ from PCB__.
save state into PCB0, and reload state from PCB1.
35
During a context switch between P0 and P1, when P1 receives a system call or gets interrupted, it will save state into ______ and reload state from ________.
PCB1, PCB0.
36
During the context switch between P0 and P1, when P1 is executing P0 will be ________ core and idle. Then the OS will put _______ onto the core, for it to continue execution while P1 is idle.
off, P0
37
If there are multiple program counters per process, multiple locations can execute at once. There will be a need for multiple ________ of control.
Threads
38
T/F: In case a process has multiple threads of execution, there MUST be storage for thread details, multiple program counters in PCB.
True.
39
_____________________ is used to maximize CPU use, it quickly switches processes onto CPU for time sharing.
Process Scheduling
40
__________ selects among available processes for next execution on CPU.
Process Scheduler.
41
Process Scheduling maintains scheduling queues of processes, which are ________________, _____________, and __________.
Job queue, Ready queue, Device queue
42
_______ queue includes the set of processes waiting for an I/O device.
Device
43
__________ queue includes the set of all processes in the system.
Job
44
_______ queue includes the set of all processes residing in main memory, ready, and waiting to execute.
Ready
45
T/F: Processes cannot migrate among the various queues.
F, they can and they do.
46
_______________ selects which process should be executed next and allocates CPU.
Short-term Scheduler
47
Short-term scheduler is also called __________ scheduler
CPU
48
T/F: Sometimes the longterm scheduler is the only scheduler in a system.
F, Short-term scheduler not long-term
49
T/F: Short-term scheduler is invoked frequently (milliseconds) therefore it must be fast.
True.
50
______________ selects which processes should be brought into the ready queue.
Long-term Scheduler
51
Long-term scheduler is also called _________ scheduler.
Job
52
Long-term scheduler is invoked (frequently/infrequently)
infrequently (seconds, minutes) so it may be slow.
53
The long-term scheduler controls the degree of ______________.
multiprogramming.
54
The number of processors in memory is the ___________________.
degree of multiprogramming
55
______________ is the execution of the program in CPU between two I/O requests (i.e. time period during which the process wants to continuously run in the CPU without making I/O.)
CPU burst
56
Processes can be described as either _____________ process or _________ process.
I/O bound, CPU-bound
57
(I/O bound, CPU-bound) process spends more time doing computations; few very long CPU bursts.
CPU-bound
58
(I/O bound, CPU-bound) process spends more time doing I/O than computations, many short CPU bursts.
I/O bound
59
T/F: Long-term scheduler strives for good process mix.
True.
60
_______________ scheduler can be added if degree of multiple programming needs to decrease.
Medium-term
61
__________ occurs when a process is removed from memory, stored on disk, brought back in from disk to continue execution.
Swapping
62
T/F: The medium-term scheduler performs swapping.
True.
63
A _______ process creates children processes, which, in turn create other processes, forming a _______ of processes
Parent, tree.
64
Generally, process identified and managed via a _______________.
process identifier (pid)
65
T/F: Parent and children process can either share all resources or no resources at all.
True
66
T/F: Parent process can share a subset of children's resources.
F, Child process shares a subset of PARENT's resources.
67
T/F: Parent and child process cannot execute concurrently.
F, They do.
68
T/F: Parent process waits until children terminate, so it can execute.
True.
69
_________ is a system call used after a fork() to replace the process' memory space with a new program.
exec()
70
______ is a system call creates new process.
fork()
71
During process Termination, the process executes its last statement and then asks the operating system to delete it using the _________ system call.
exit()
72
Process termination returns status data from child to parent via _______ system call.
wait()
73
T/F: Process Termination results in the process’ resources being deallocated by the operating system.
True.
74
Parent may terminate the execution of children processes using the ______ system call.
abort()
75
T/F: Parent process may abort child process because child has exceeded allocated resources.
True.
76
T/F: Parent process may abort child process because task assigned to child is no longer required.
True.
77
T/F: Some operating systems do not allow child to exists if its parent has terminated. If a process terminates, then all its children must also be terminated.
True.
78
_______________ occurs when all children, grandchildren, etc. are terminated.
cascading termination
79
Cascading termination is initiated by the (parent process/operating system).
operating system.
80
The parent process may wait for termination of a child process by using the _______ system call.
wait()
81
When the parent process waits for the process termination of a child, the wait() system call returns ____________ and ___________ of the terminated process.
status information, the pid.
82
(Independent/Cooperating) process cannot affect or be affected by the execution of another process. (Independent/Cooperating) process can affect or be affected by the execution of another process.
Independent Cooperating
83
T/F: Processes within a system may be independent or cooperating.
True.
84
_____________ and ____________ are the two models of IPC.
Shared memory, Message passing.
85
Cooperating processes require a facility/mechanism for ________________________ (IPC)
interprocess communication
86
During shared memory IPC, A region of shared memory is established among ____________ processes.
two or more
87
During shared memory IPC, the establishment of that shared region is done via the help of the _________(via a system call).
kernel
88
T/F: During Shared memory IPC, processes read and write shared memory region indirectly as ordinary memory access.
False, directly.
89
T/F: During shared memory IPC, the kernel is NOT involved when the processes are reading and and writing the shared memory.
T, communication is under the control of the users processes not the operating system
90
T/F: Message passing is faster than shared memory IPC.
F, Shared memory is faster.
91
When solving the Producing-Consumer problem using shared memory IPC, there can be two types of buffers used; _________ which places no practical limit on the size of the buffer and ________ which assumes that there is a fixed buffer size.
unbounded-buffer, bounded-buffer.
92
When an unbounded buffer is used for shared memory IPC, both the consumer and producer must wait.
False, when an bounded buffer is used the consumer must wait if the buffer is empty, produce will wait if the buffer is full. Only the consumer may have to wait for new items when the an unbounded buffer is used.
93
T/F: During shared memory IPC, the producer and consumer do not need to be synchronized.
F, The producer and consumer must be synchronized, so that the consumer does not try to consume an item that has not yet been produced.
94