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
Q

FC,FS:

A

Whatever enters the processor first, gets completed first

26
Q

SJF:

A

When jobs arrive, the shortest job (by CPU bursts) is completed first.

27
Q

RR:

A

Switches between each process by cutting CPU bursts down by a “time quantum” (a specific number).

28
Q

Batch system uses which algorithm?

A

FCFS. Batch system handles one job at a time as it is received.

29
Q

Multi-Programmed Batch uses which algorithm?

A

SJF. Multi-Programming handles a job pool, holding many jobs at once before it is sent to the run queue.

30
Q

Time Sharing uses which algorithm?

A

RR. It equally divides CPU time between multiple processes.

31
Q

Strengths and Weaknesses of SJF (pre-emptive)

A

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
Q

CPU burst:

A

The time that CPU is used before a process is sent to I/O or process is terminated.

33
Q

Time Quantum:

A

A number (of CPU burst time) used in Round Robin scheduling algorithm that should allow at least half of processes to be completed.

34
Q

With a high time quantum number, what is the risk?

A

Average Turnaround and average response time will suffer.

35
Q

With a low time quantum number, what is the risk?

A

A high chance of CPU overhead.

36
Q

Symbol Table:

A

holds operation codes (symbols) to perform the intended calculation and/or algorithm.

37
Q

Instruction Code:

A

All instructions of a process written in machine code (0/1).

38
Q

Functions:

A

Similar to instruction code, more machine code based on processes’ written functions.

39
Q

Stack Space:

A

Where temporary registers/data reside while process runs and until process is completed.

40
Q

PCB:

A

Holds all process information needed to identify and manipulate how it runs.