Processes and Threads Flashcards

1
Q

System initialization, execution of creation syscall, user requesting

A

Process creation

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

normal exit, program exit, fatal error, or killed by another process

A

Process termination

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

blocked, running or ready

A

Process state

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

Cannot transition from ready to ______ or blocked to _______

A

blocked, running

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

Processes that remain in the background

A

Daemon

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

Stores information about the process, including PC, stack pointer, process state

A

Process table

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

U=1-p^n

A

CPU utilization formula

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

Enable parallelism with blocking syscalls

A

Threads

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

Faster to create and destroy

A

Threads

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

Natural for multiple cores

A

Threads

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

Easier programming model

A

Threads

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

Memory is shared

A

Threads

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

Better for I-O bound tasks

A

Threads

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

Thread table contains information so runtime system can manage. If thread blocks, rts stores thread info in table and finds new thread

A

Threads in userspace - the good

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

State save and scheduling are invoked faster than in kernel

A

Threads in userspace - the good

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

Cannot execute blocking system calls

A

Threads in userspace - the bad

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

Do not voluntarily give up CPU

A

Threads in userspace - the bad

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

Kernel keeps same thread table as user table

A

Threads in kernelspace - the good

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

If thread blocks, can just choose another

A

Threads in kernel space - the good

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

Expensive to manage and takes up valuable space

A

Threads in kernel space - the bad

21
Q

Multiplex user level threads onto kernel level threads

A

Hybrid approach

22
Q

Kernel aware of kernel threads only

A

Hybrid approach

23
Q

User-level threads scheduled, created, destroyed indepedently of kernel thread

A

Hybrid approach

24
Q

Programmaer must decide how many user level and kernel level threads

A

Hybrid approach

25
Only one process can use a shared variable / file at a time
Mutual exclusion
26
Shared memory which leads to races
Critical region
27
Ensure two processes cannot be in the same critical region at the same time
How to avoid races
28
Mutual Exclusion
Properties of a good solution to avoid race conditions
29
No assumption about speed or number of CPUs
Properties of a good solution to avoid race conditions
30
No process outside critical zone will block other processes
Properties of a good solution to avoid race conditions
31
No starvation
Properties of a good solution to avoid race conditions
32
How one process can pass information to another
IPC problems
33
How to deal with process conflicts
IPC problems
34
How to sequence correctly with dependencies
IPC problems
35
Integer variable, used to make process sleep / wakeup
semaphore
36
Down checks semaphore. If > 0 then _____ semaphore. If 0, process _______
decrement semaphore and continue, sleep
37
Two operations: down and up
semaphore
38
Up increments semaphore. If more than one process is asleep, _______________
wake a random process
39
Variable that can be in one of two states, locked or unlocked
mutexes
40
Good for thread packages in user space
mutexes
41
Allows threads to block due to some condition not being met
Condition variable
42
Two functions: wait and signal
Condition variable
43
wait until condition is set to true
Condition variable wait
44
sets condition to true, allowing one more to enter block
Condition variable wait
45
Abstract data type which encapsulates shared resource
monitor
46
concurrent process executes procedures to access shared resources
monitor
47
only one process can execute code at a given time
monitor
48