Chapter 3 - Intro (mine) Flashcards

1
Q

What is a container?

A

Basically lightweight VM.
- lightweight, isolated environment
- houses an application and has all of the things it needs to run (dependencies)
- shares the host’s OS kernel.

Think of a shipping container with you + all your stuff in it. It has everything you need to function. You’ll share the ship’s resources - bathroom, engine, deck, etc.

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

What is a process?

A

A running program

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

What does the OS do to create a process?

A

It creates a new address space and a virtual processor to execute the process.

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

How does an OS keep track of its processes?

A

Keeps track of the processes/ virtual processors in a process table.

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

What’s a process control block?

A

A data structure that contains info about the proccess - ID, state, control.
(It has stuff like machine code, memory allocation (data, stack, heap), resources (e.g., files, devices), processor context (e.g., registers, memory addresses))

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

What is process context?

A

Represents the state of the process = CPU register values, memory maps, open files, accounting information, privileges, etc.

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

What is context switching?

A

Switching between processes by saving and reloading contexts (involves the OS)
Switching between threads by saving and reloading contexts (share addr space, so independent of OS)

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

Process: +ves and -ves

A

Independent/ strong isolation; but heavyweight /need new addr space

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

What is a thread?

A
  • A piece of code that executes independently of other threads
  • There’s no attempt to get concurrency transparency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What’s contained in a thread context?

A

Processor context + minimal info for thread mgmt

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

Threads vs. Processes

A

Performance vs. isolation:
- Threads have better performance (fast to create, fast to context switch)
- Isolation is left entirely to developers (threads can access shared data in the process)

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