Chapter 4 - Threads, Context, Concurrency, and Processes Flashcards

1
Q

Process

A

A program in execution in a context.

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

Race condition

A

Possible when two or more threads, sharing access to a common resource, are allowed to execute concurrently and at least one of those threads modifies the resource.

All of this is required for a race condition to occur, but a race condition won’t occur just because all of this is true.

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

Context

A

All the information needed to record the current status of a computation so that the OS can pause its execution and still have the computation proceed correctly when resumed later.
Example: NANO on prclab

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

Thread

A

Unit of computation, the active element of a process. Each process has at least one thread (first one created by the OS).

All threads within a process execute the same code, but each thread executes in its own context. Has its own hardware context (when not in used, stored in the TCB. When in use, used in hardware).

Stack (local variables within a function) belongs to the thread, not the process.

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

Sibling threads

A

Threads within a process - no parent/child relationship among threads. Easy to make them communicate.

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

TCB

A

Thread Control Block. Where threads are stored when not in use. Relevant to hardware context.

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