Operating Systems Flashcards

1
Q

What is a multi programmed batch, and how did it improve from batch OS?

A

Multi-programmed batch OS takes in and runs multiple types of jobs at a time, in “batches.” It does so by filtering through a job pool.

Improvements: Less CPU idle time and faster run time.

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

What is a PCB? How is it important to muti-program batch?

A

PCB (Process Control Block).
It is important for MPB because it helps jobs(processes) be resumed/paused smoothly, making switching between jobs a more efficient process.

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

PCB Components:

A

-Context Data
-Process ID
-Priority
-User Account Info
-Processing State

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

Context Data:

A

Pointers, registers used, and other information that is stored in a PCB to better understand the process running and to help resume/pause a program.

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

Process ID:

A

ID to identify a process.

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

Priority

A

“Height of importance” of a process.

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

User Account Info:

A

Identifying information of the user who sent the program.

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

Processing State:

A

(Running, wait, I/O, ready…)

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

Difference between process and program

A

Process is a set of instructions in an active state, actively used by the CPU. Program is passively stored instructions, waiting in memory to be run.

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

Define PCB:

A

A block of memory created when a process is created. It is designed to store any relevant information about the instructions in a process. Processes that are created and sent to job pool.

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

What actions can be taken on a process?

A

Processes can be: created, terminated, suspended, and interrupted.

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

Before New Queue:

A

Program has to be pulled from memory.

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

Before Ready Queue:

A

Creation of process and PCB, scheduled by long-term.

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

Before Run Queue:

A

Scheduled by short-term scheduler.

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

Before Wait Queue:

A

An event is triggered that needs I/O or another response from the computer.

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

Run to Ready:

A

A flag is marked somewhere in the instructions, causing the process to be paused.

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

Wait to Ready:

A

The event that caused the process to be put in wait queue is done.

18
Q

Run to Terminate:

A

The last instruction is completed, and any memory/data used by the processor is returned to computer.

19
Q

Long term scheduler:

A

Picks with jobs to be sent to ready queue. Rarely used.

20
Q

Short term scheduler:

A

Picks which process to be run. Frequently used.

21
Q

Processing sorting algorithms:

A

First Come, First Served
Shortest Job First
Round Robin

22
Q

With sorting algorithm is the most efficient from a CPU usage standpoint?

A

Round Robin

23
Q

Response Time:

A

1st time in run queue - arrival time

24
Q

Turnaround Time:

A

Termination time - arrival time

25
FC,FS:
Whatever enters the processor first, gets completed first
26
SJF:
When jobs arrive, the shortest job (by CPU bursts) is completed first.
27
RR:
Switches between each process by cutting CPU bursts down by a "time quantum" (a specific number).
28
Batch system uses which algorithm?
FCFS. Batch system handles one job at a time as it is received.
29
Multi-Programmed Batch uses which algorithm?
SJF. Multi-Programming handles a job pool, holding many jobs at once before it is sent to the run queue.
30
Time Sharing uses which algorithm?
RR. It equally divides CPU time between multiple processes.
31
Strengths and Weaknesses of SJF (pre-emptive)
Strengths: Shortest average response time and average turnaround time. Weaknesses: More possibility of OS over-heading. Long CPU idle time for some processes. Processes could take forever to finish.
32
CPU burst:
The time that CPU is used before a process is sent to I/O or process is terminated.
33
Time Quantum:
A number (of CPU burst time) used in Round Robin scheduling algorithm that should allow at least half of processes to be completed.
34
With a high time quantum number, what is the risk?
Average Turnaround and average response time will suffer.
35
With a low time quantum number, what is the risk?
A high chance of CPU overhead.
36
Symbol Table:
holds operation codes (symbols) to perform the intended calculation and/or algorithm.
37
Instruction Code:
All instructions of a process written in machine code (0/1).
38
Functions:
Similar to instruction code, more machine code based on processes' written functions.
39
Stack Space:
Where temporary registers/data reside while process runs and until process is completed.
40
PCB:
Holds all process information needed to identify and manipulate how it runs.