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
Q

(ENUM) The many pieces of information of a process control block that is associated with specific processes. (7)

A
  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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

the state may be new, ready, running, waiting, halted and so on.

A

PROCESS STATE

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

– the counter indicates the address of the next instruction to be
executed for the process.

A

PROGRAM COUNTER

28
Q
  • 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.
A

CPU REGISTERS

29
Q

this information includes a process priority, pointer to
scheduling queues and any other scheduling parameters.

A

CPU SCHEDULING INFORMATION

30
Q

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.

A

MEMORY MANAGEMENT INFORMATION

31
Q

this information includes the amount of CPU and real tie used,
time limits, account numbers, job or process numbers and so on.

A

ACCOUNTING INFORMATION

32
Q
  • 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.
A

I/O STATUS INFORMATION

33
Q

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.

A

DISPATCHER

34
Q

3 FUNCTIONS OF DISPATCHERS

A

 Switching context
 Switching to user mode
 Jumping to the proper location in the user program to restart the program

35
Q

2 TYPES OF PROCESSOR QUEUE

A

SINGLE QUEUE MECHANISM
MULTIPLE QUEUE MECHANISM

36
Q

– its policy is to give all users equal service.

A

SINGLE QUEUE MECHANISM

37
Q

its policy is to give high priority on a short processor

A

MULTIPLE QUEUE MECHANISM

38
Q

4 ADVANTAGES OF MULTIPLE QUEUES

A

 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
Q

It is an OS that elects the next job to be admitted to the system and the next process to run.

A

SCHEDULER

40
Q

3 types of schedulers

A

LONG TERM (high level / job scheduler)
Medium Term (I/O Scheduler)
Short Term (CPU Scheduler / Dispatcher)

41
Q

(SCHD) it determines when a particular program should
be loaded into the memory for each execution.

A

LONG TERM (high level / job scheduler)

42
Q

(SCHD) It controls the degree of
multiprogramming (the number or processes in memory).

A

LONG TERM (high level / job scheduler)

43
Q

(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.

A

FALSE

44
Q

Its primary objective is to
provide a balance mix of jobs such as processor-bound jobs or I/O bound jobs.

A

LONG TERM (high level / job scheduler)

45
Q

it is important to the long term scheduler to select a good mix of ___________ and ____________ jobs.

A

I/O bound
CPU BOUND

46
Q

– is a process that spends of its time doing I/O than it spends doing computations

A

I/O Bound Process

47
Q

is a process that generates I/O requests infrequently, using more
of its time doing computation.

A

CPU Bound Process

48
Q

(SCHD)– it determines which I/O device will be used to service a
particular I/O request.

A

Medium Term (I/O Scheduler)

49
Q

(SCHD)- It is in charge of handling swapped-out process.

A

Medium Term (I/O Scheduler)

50
Q

About medium term scheduler– it is when a process reintroduced into memory and its execution can be continued where it left off.

A

SWAPPING

51
Q

A swapping may occur for 3 reasons

A
  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
Q

(SCHD) selects from the processes that are ready to
execute and allocates the CPU to one of them.

A

Short Term (CPU Scheduler / Dispatcher)

53
Q

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 _______________________

A

DEADLOCK

54
Q

A deadlock occurs when __________________________

A

a set of processes, each holding some resources, each requesting
some resources and none of them is able to obtain what is needed.

55
Q

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).

A

preemptable
non preemptable
reusable
consumable

56
Q

(DEADLOCK CHARACTERIZATION) A deadlock situation can arise if the following 4conditions hold simultaneously in a
system:

A

MUTUAL EXCLUSION
HOLD AND WAIT
NO PREEMPTION
CIRCULAR WAIT CYCLE

57
Q

(DEADLOCK) – if each resource type has only one instance, only one process at a
time can use the resource.

A

MUTUAL EXCLUSION

58
Q

(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.

A

HOLD AND WAIT

59
Q

(DEADLOCK) – a resource can be released only voluntarily by the process holding it after that process has completed its task

A

NO PREEMPTION

60
Q

(DEADLOCK) there must exist a set of processes waiting for resources that
is held by other processes and so on.

A

CIRCULAR WAIT / CYCLE

61
Q

Deadlocks can be described more precisely in terms of a directed graph called a _______________________

A

RESOURCE ALLOCATION GRAPH

62
Q

(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.

A

MUTUAL EXCLUSION

63
Q

(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.

A

Hold and Wait

64
Q

(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.

A

(DP)NO PREEMPTION

65
Q

(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.

A

CYCLE / CIRCULAR WAIT

66
Q

A system is in a safe state only if there exists a _____________

A

SAFE SEQUENCE

67
Q

One way to avoid a deadlock is to _________________________________________________________.

A

to make sure that the state is safe wherein the system can
allocate resources to each process up to its maximum needs.