Processes Flashcards

1
Q

What is a process?

A

A program in execution.

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

Can multiple processes run the same program?

A

Yes, ex: multiple users running bash

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

Which process have parent processes?

A

All except the first process

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

How to list processes?

A

◼ ps - List processes of the current shell session
◼ ps –u <your-login> - List processes owned by you
◼ ps –e - List all processes of the system</your-login>

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

What are the different states of a process?

A

New, Ready, Running, Waiting, Terminated

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

When is a process IO bound vs CPU bound?

A

IO bound, usually waiting for vent like mouse click. CPU bound waiting for cpu to finish their process, like video encoding.

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

What state are IO bound and CPU bound processes?

A

IO bound usually waiting state, CPU bound usually in ready or running state.

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

Are more applications usually IO or CPU bound?

A

IO bound

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

What is inside each entry of the process table?

A

PID: Index in process table
-Command and args
-Environment Vars
-Current Dir
-Owner (User ID)
-Stdin/Stdout/Stderr
-List of memory mappings used by
process
-List of Open Files
For each thread in the process:
- PC (Program Counter)
- Registers
- Stack
- State (Wait, Ready, Running
etc.)

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

What is the process scheduler?

A

the OS subsystem that ones run process after the other and decides what process to run next.

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

What is a context switch?

A

OS procedure to switch processes

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

What causes a context switch?

A

process yields cpu for another process, timer interrupt

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

What is non - preemptive scheduling (cooperative scheduling)?

A

Context switch only happens when process goes to waiting state.

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

What is preemptive scheduling?

A

Context switch caused by frequent timer interrupts.

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

What are the pros of both non preemptive, and preemptive scheduling?

A

Non is easier to implement, Preemptive prevents monopoly of CPU.

Preemptive is used today.

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

What is Round Robin?

A

All ready processes are put in and processed using a queue. Once timer expires, current process is moved to the back.

17
Q

What is quantum length?

A

The set time before force switching processes.

18
Q

What does a short length do?

A

Shortens average completion time, but increases amount of context switching time.

19
Q

What is the quantum switch overhead?

A

Amount of time it takes to do a context switch as a portion of the quantum time.

Overhead% = Context switch time / quantum time

20
Q

What is the standard quantum time today?

21
Q

What is a CPU Burst?

A

The time a process needs the CPU. 90% of CPU bursts less than 10ms

22
Q

How do more important processes get handled before less important ones?

A

With the Multilevel Feedback-Queue Scheduling

23
Q

What is Process Aging?

A

The process of increasing a processes priority as it waits to be handled.