OPERATING SYSTEMS LESSON 2 Flashcards

1
Q

program in execution and must progress in a sequential fashion.

A

PROCESS

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

Overview - (3) Parts of a Process

A

1.Current activity
2. Contents of the processor’s registers
3. Process stack

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

2 parts of a process stack

A

1 Temporary Data
2 Data section

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

(T or F) A program is a process

A

FALSE

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

it is a passive entity such as the contents of a file stored on
disk,

A

PROGRAM

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

is an active entity with a program counter specifying the next instruction to
execute and a set of associated resources.

A

PROCESS

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

A program is an inanimate entity; only when a processor “___________” into it, does it becomes the “__________” entity which we call a process.

A
  1. Breathes Life
  2. Active
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

State Transition of a process (4)

A
  1. Dispatch
  2. Timerrunout
  3. Block
  4. Wake up
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ready —–running

A

DISPATCH

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

running —–ready

A

TIMERRUNOUT

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

running —–ready

A

BLOCK

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

blocked —–ready

A

WAKE UP

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

to select the next task and get it ready for processing

A

DISPATCH

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

if the process does not voluntarily relinquish the CPU before the time interval expires, the interrupt causes the operating system to regain control

A

TIMERRUNOUT

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

a group of digits, characters or words that are held in one reaction of an I/O medium and handled as an input

A

BLOCK

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

input becomes available

A

WAKE UP

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

(ENUM) The State Diagram Values (5)

A
  1. New
  2. Running
  3. Waiting
  4. Ready
  5. Terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

State - the process is being created

A

NEW

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

State - instructions are being created

A

RUNNING

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

State - the process is waiting for some event to occur (such as I/O completion or reception of a signal)

A

WAITING

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

STATE – 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
22
Q

STATE– the process has finished execution

A

Terminated

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

Other term for “process control block”

A

TASK CONTROL BLOCK

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

It serves as a dictionary for any information that may vary from process to process.

A

PROCESS CONTROL BLOCK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
(ENUM) The many pieces of information of a process control block that is associated with specific processes. (7)
1. PROCESS STATE 2. PROGRAM COUNTER 3. CPU REGISTERS 4. CPU SCHEDULING INFORMATION 5. MEMORY MANAGEMENT INFORMATION 6. ACCOUNTING INFORMATION 7. I/O STATUS INFORMATION
26
the state may be new, ready, running, waiting, halted and so on.
PROCESS STATE
27
– the counter indicates the address of the next instruction to be executed for the process.
PROGRAM COUNTER
28
- the registers vary in number and type, depending on the computer’s architecture. They include accumulators, index registers, stack pointers and general purpose registers plus any condition-code information.
CPU REGISTERS
29
this information includes a process priority, pointer to scheduling queues and any other scheduling parameters.
CPU SCHEDULING INFORMATION
30
this information may include the value of the base and limit registers, the page table or the segment tables depending on the memory system used by the operating system.
MEMORY MANAGEMENT INFORMATION
31
this information includes the amount of CPU and real tie used, time limits, account numbers, job or process numbers and so on.
ACCOUNTING INFORMATION
32
- the information includes the list of I/O devices (such as tape drives) allocated to this process, a list of open files and so on.
I/O STATUS INFORMATION
33
is the module that gives control of the CPU to the process selected by the short-term scheduler. It is responsible for placing process into execution. It must be short, efficient and fast as possible.
DISPATCHER
34
3 FUNCTIONS OF DISPATCHERS
 Switching context  Switching to user mode  Jumping to the proper location in the user program to restart the program
35
2 TYPES OF PROCESSOR QUEUE
SINGLE QUEUE MECHANISM MULTIPLE QUEUE MECHANISM
36
– its policy is to give all users equal service.
SINGLE QUEUE MECHANISM
37
its policy is to give high priority on a short processor
MULTIPLE QUEUE MECHANISM
38
4 ADVANTAGES OF MULTIPLE QUEUES
 The priority is the high priority process (short processes)  It permits the use of one dispatching mechanism  It maintains a ready queue for each of several classes  You can add a new process or job at the tail of highest priority without disturbing the execution of other processes.
39
It is an OS that elects the next job to be admitted to the system and the next process to run.
SCHEDULER
40
3 types of schedulers
LONG TERM (high level / job scheduler) Medium Term (I/O Scheduler) Short Term (CPU Scheduler / Dispatcher)
41
(SCHD) it determines when a particular program should be loaded into the memory for each execution.
LONG TERM (high level / job scheduler)
42
(SCHD) It controls the degree of multiprogramming (the number or processes in memory).
LONG TERM (high level / job scheduler)
43
(T OR F) If the degree of multiprogramming is stable, then the average rate of process creating must not be equal to the average departure rate of processes leaving the system.
FALSE
44
Its primary objective is to provide a balance mix of jobs such as processor-bound jobs or I/O bound jobs.
LONG TERM (high level / job scheduler)
45
it is important to the long term scheduler to select a good mix of ___________ and ____________ jobs.
I/O bound CPU BOUND
46
– is a process that spends of its time doing I/O than it spends doing computations
I/O Bound Process
47
is a process that generates I/O requests infrequently, using more of its time doing computation.
CPU Bound Process
48
(SCHD)– it determines which I/O device will be used to service a particular I/O request.
Medium Term (I/O Scheduler)
49
(SCHD)- It is in charge of handling swapped-out process.
Medium Term (I/O Scheduler)
50
About medium term scheduler– it is when a process reintroduced into memory and its execution can be continued where it left off.
SWAPPING
51
A swapping may occur for 3 reasons
1. WHEN a running process may become suspended after making an I/O request or by issuing a system call 2. WHEN a suspended process can’t make any further progress, until the related suspending condition is removed 3. WHEN it is beneficial to remove them from the main memory to make room for other processes.
52
(SCHD) selects from the processes that are ready to execute and allocates the CPU to one of them.
Short Term (CPU Scheduler / Dispatcher)
53
In a multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources; if the resources are not available at that time, the process enters a wait state. It may happen that waiting processes will never again change state, because the resources they have requested are held by other waiting processes. This situation is called a _______________________
DEADLOCK
54
A deadlock occurs when __________________________
a set of processes, each holding some resources, each requesting some resources and none of them is able to obtain what is needed.
55
These resources may be ___________________(can be taken away from the process that is holding it) or _______________ (cannot be taken away). It may also be ______________(can be used again after a process is done using it like the memory, printer) or _______________________(can be used only once like the signal).
preemptable non preemptable reusable consumable
56
(DEADLOCK CHARACTERIZATION) A deadlock situation can arise if the following 4conditions hold simultaneously in a system:
MUTUAL EXCLUSION HOLD AND WAIT NO PREEMPTION CIRCULAR WAIT CYCLE
57
(DEADLOCK) – if each resource type has only one instance, only one process at a time can use the resource.
MUTUAL EXCLUSION
58
(DEADLOCK) - there must exist a process that is holding at least one resource and is waiting to acquire additional resources that are currently being held by other processes.
HOLD AND WAIT
59
(DEADLOCK) – a resource can be released only voluntarily by the process holding it after that process has completed its task
NO PREEMPTION
60
(DEADLOCK) there must exist a set of processes waiting for resources that is held by other processes and so on.
CIRCULAR WAIT / CYCLE
61
Deadlocks can be described more precisely in terms of a directed graph called a _______________________
RESOURCE ALLOCATION GRAPH
62
(DP) – sharable resources do not require mutually exclusive access like the read only file but it is not possible to prevent deadlocks by denying the mutual exclusion conditions because some resources are intrinsically non sharable.
MUTUAL EXCLUSION
63
(DP) This deadlock condition has 2 protocols 1. To require each process to request and be allocated all its resources before it begins execution and to guarantee that whenever a process requests a resource, it does not hold any other resources. 2. To allow a process to request resources only when the process has none. Before it can request, it must release all the resources that it is currently allocated.
Hold and Wait
64
(DP)if a process that is holding some resources requests another resource that cannot be immediately allocated to it, and then all resources currently being held are preempted. It is often applied to resources whose state can be easily saved and restored later such as CPU register and memory space but not printers and tape drives.
(DP)NO PREEMPTION
65
(DP)if a process wants to use the tape drive and the printer at the same time, it must first request the tape drive and then request the printer. So whenever a process requests an instance of resource type, it has released any resources.
CYCLE / CIRCULAR WAIT
66
A system is in a safe state only if there exists a _____________
SAFE SEQUENCE
67
One way to avoid a deadlock is to _________________________________________________________.
to make sure that the state is safe wherein the system can allocate resources to each process up to its maximum needs.