Module 2 Flashcards

1
Q

A _______ is a program in execution.

A

Process

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

True or False.
A program is an active entity while a process is a passive entity.

A

False
(a program is a PASSIVE entity while a process is an ACTIVE entity)

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

True or False.
A computer system consists of a collection of processes.

A

True

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

True or False.
User processes execute system code. Operating system processes execute user code.

A

False
(OPERATING SYSTEM processes execute SYSTEM code, USER processes execute USER code)

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

True or False.
Several processes within different programs are considered separate execution sequences.

A

False
(several processes within THE SAME program)

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

True or False.
All processes can execute concurrently with the CPU multiplexing among them (time sharing).

A

True

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

A ________ is a cycle of CPU execution (CPU burst) and I/O wait (I/O burst) that alternates between these two states.

A

Process

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

True or False.
Process execution begins with an I/O burst then a CPU burst and so on.

A

False
(begins with a CPU BURST then an I/O BURST)

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

The last CPU burst will end with a ___________ to terminate execution.

A

System Request

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

_______- are written and becomes a process when executed/loaded into memory.

A

Programs

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

A process can be divided into four sections. What are these sections?

A

(SHT Damn)
- Stack
- Heap
- Text
- Data

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

This section contains the temporary data such as function parameters, return address and local variables.

A

Stack

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

This section is dynamically allocated memory to a process during its run time.

A

Heap
(dynamically allocated memory)

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

This section includes the current activity represented by the value of Program Counter and the contents of the processor’s registers.

A

Text

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

This section contains the the code.

A

Text

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

This section contains the global and static variables.

A

Data

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

True or False.
As a process executes, it changes states.

A

True

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

In this 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

In this state, the process is waiting for the OS to assign a processor to it.

A

Ready

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

In this state, the process has finished execution.

A

Terminated

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

Each process is represented in the operating system by a ________________.

A

Process Control Block (PCB)

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

In this state, the process is waiting for some event to occur (such as an I/O completion).

A

Waiting

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

In this state, the CPU is executing its instructions.

A

Running

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

This is also known as a task control block.

A

Process Control Block (PCB)

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

It is the repository of information of a process.

A

Process Control Block (PCB)

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

What are the parts of the process control block?

A
  • Process State
  • 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
24
Q

This part of the process control block indicates the address of the next instruction to be executed.

A

Program Counter

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

This part of the process control block include accumulators, index registers, stack pointers, and general-purpose registers, plus any condition-code information.

A

CPU Registers

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

This part of the process control block process priority, pointers to scheduling queues, and scheduling parameters.

A

CPU Scheduling Information

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

This part of the process control block along with the program counter, must be saved when an interrupt occurs to allow the process to continue.

A

CPU Registers

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

This part of the process control block contains information on limits registers or page tables.

A

Memory Management Information

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

This part of the process control block contains the amount of CPU and real time used, time limits, account numbers, job or process numbers.

A

Accounting Information

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

This part of the process control block contains the I/O requests, I/O devices allocated, a list of open files.

A

I/O Status Information

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

True or False.
The processes in the system cannot execute concurrently or multitasked on a CPU.

A

False
(CAN execute concurrently)

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

A process may create new processes via create process system call during execution. The creating process is the __________ whereas the new processes are the ______________.

A

Parent Process / Children or Sub-process

31
Q

True or False.
The sub-process may obtain resources directly from the OS or use a subset of the resources of the parent process (Inheritance).

A

True

32
Q

True or False.
Restricting a child process to a subset of the parent’s resources prevents any process from overloading the system by creating too many processes.

A

True

33
Q

True or False.
When a process creates a new process, either:
The parent continues to execute concurrently by itself.
The parent waits until all its children have terminated.

A

False
(continues to execute concurrently WITH ITS CHILDREN)

34
Q

A process terminates when it finishes its last statement and asks the operating system to delete it using the _____________.

A

Exit System Call

35
Q

True or False.
A parent may terminate the execution of one of its children when:
1. The child has exceeded its usage of some resources it has been allocated.
2. The task assigned to the child is no longer required.
3. The parent is exiting, and the OS terminates the all its children.

A

True

36
Q

True or False.
The concurrent processes may be independent processes or cooperating processes.

A

True

37
Q

A process is ________- if it cannot affect or be affected by other processes or does not share any data.

A

Independent

38
Q

An independent process is ________, meaning the result of the execution depends solely on the input state.

A

Deterministic

39
Q

An independent process is ________ meaning the result of the execution will always be the same for the same input.

A

Reproducible

40
Q

True or False.
An independent process’ execution cannot be stopped and restarted without causing ill effects.

A

False
(CAN BE stopped and restarted without causing ill effects)

41
Q

A process is _________ if it can affect or be affected by other processes or share data.

A

Cooperating

42
Q

True or False.
The results of a cooperating process’ execution cannot be predicted in advance, since it depends on relative execution sequence.

A

True

43
Q

True or False.
The results of a cooperating process’ execution is nondeterministic since it will not always be the same for the same input.

A

True

44
Q

True or False.
Concurrent execution of cooperating process must have processes communicate and synchronize their actions.

A

True

45
Q

The objective of multiprogramming is to have some process running at all times, to ________.

A

Maximize CPU utilization

46
Q

True or False.
Multiprogramming also decreases throughput, which is the amount of work the system accomplishes in a given time interval.

A

False
(multiprogramming also INCREASES throughput)

47
Q

The idea of multiprogramming is if one process is in the waiting state, then another process which is in the ready state goes to the _______.

A

Running state

48
Q

A _______ consists of all processes that enters a system.

A

Job Queue

49
Q

A _______ consists of processes residing in the memory ready and waiting to execute.

A

Ready Queue
(waiting to execute)

50
Q

A process migrates between various scheduling queues and the OS must select processes with an appropriate _______.

A

Scheduler

51
Q

__________ selects processes from the secondary storage and loads them into memory for execution.

A

Long-term Scheduler

52
Q

The long-term scheduler is also known as the “_______”.

A

Job Scheduler

53
Q

True or False.
The long-term scheduler executes much more frequently.

A

False
(the long-term scheduler executes much LESS frequently)

54
Q

True or False.
There may be minutes between the creation of new processes in the system when using a long-term scheduler.

A

True

54
Q

True or False.
The long-term scheduler controls the degree of multiprogramming – the number of processes in memory.

A

True

54
Q

True or False.
The long-term scheduler can take less time to select a process for execution.

A

False
(the long-term scheduler can take MORE time to select a process for execution)

54
Q

_______ selects process from the ready queue, and allocates the CPU to one of them.

A

Short-term scheduler

55
Q

The short-term scheduler is also known as the “_______”.

A

CPU Scheduler

56
Q

True or False.
The short-term scheduler must select a new process more frequently.

A

True

57
Q

True or False.
A process may execute for a few seconds before waiting for an I/O request.

A

False
(ONLY A FEW MILLISECONDS)

58
Q

True or False.
The short-term scheduler must be very fast.

A

True

59
Q

____________ removes (swaps out) certain processes from memory to lessen the degree of multiprogramming when thrashing occurs.

A

Medium-term scheduler

60
Q

True or False.
In a medium-term scheduler the process can be reintroduced into memory and its execution can be continued where it left off, this scheme is called cycling.

A

False
(this scheme is called SWAPPING)

61
Q

This refers to the CPU being switched from one process to another.

A

Context Switch

62
Q

True or False.
Context-switch time is pure overhead, because the system does no useful work while switching and should therefore be minimized.

A

True

63
Q

Whenever the _______ becomes idle, the OS or CPU scheduler must select a process in the ready queue for execution.

A

CPU

64
Q

True or False.
CPU scheduling decisions may take place under three circumstances.

A

False
(may take place under FOUR circumstances)

65
Q

Preemptive or Non-preemptive?
Switches from running state to waiting state.

A

Non-Preemptive

66
Q

Preemptive or Non-preemptive?
Switches from running state to ready state.

A

Preemptive

66
Q

Preemptive or Non-preemptive?
Switches from waiting state to ready state.

A

Preemptive

67
Q

Preemptive or Non-preemptive?
When a process terminates.

A

Non-Preemptive

68
Q

In __________ scheduling, the process keeps the CPU until it terminates or switches states. No process is interrupted until it is completed.

A

Non-preemptive

69
Q

In ____________ works by dividing time slots of CPU to a given process. The time slot given might be able to complete the process or not be able to. This scheduling is used when the process switch to ready state.

A

Preemptive scheduling

70
Q

___________ measures how busy is the CPU. CPU utilization may range from 0 to 100 percent.

A

CPU Utilization

71
Q

__________ is the amount of work or jobs completed in a unit of time.

A

Throughput

72
Q

____________- measures how long it takes to execute a process. It is the interval from the time of submission to the time of completion.

A

Turnaround Time

73
Q

____________ is the time a job waits for resource allocation. It is the total amount of time a process spends waiting in the ready queue.

A

Waiting Time

74
Q

____________ is the time from the submission of a request to the first response. It is not the time that it takes to output that response.

A

Response Time

75
Q

True or False.
A good CPU scheduling algorithm maximizes CPU utilization and throughput and minimizes turnaround time, waiting time and response time.

A

True

76
Q

True or False.
It may be better to maximize the minimum response time.

A

False
(MINIMIZE the MAXIMUM response time)

77
Q

True or False.
For interactive systems (time-sharing systems), minimizing the variance in the response time is less important than averaging response time.

A

False
(minimizing the variance in the response time is MORE important than averaging response time)

78
Q

True or False.
A reasonable and predictable response may be more desirable than a variable response time.

A

True