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
Q

Only one process can use a shared variable / file at a time

A

Mutual exclusion

26
Q

Shared memory which leads to races

A

Critical region

27
Q

Ensure two processes cannot be in the same critical region at the same time

A

How to avoid races

28
Q

Mutual Exclusion

A

Properties of a good solution to avoid race conditions

29
Q

No assumption about speed or number of CPUs

A

Properties of a good solution to avoid race conditions

30
Q

No process outside critical zone will block other processes

A

Properties of a good solution to avoid race conditions

31
Q

No starvation

A

Properties of a good solution to avoid race conditions

32
Q

How one process can pass information to another

A

IPC problems

33
Q

How to deal with process conflicts

A

IPC problems

34
Q

How to sequence correctly with dependencies

A

IPC problems

35
Q

Integer variable, used to make process sleep / wakeup

A

semaphore

36
Q

Down checks semaphore. If > 0 then _____ semaphore. If 0, process _______

A

decrement semaphore and continue, sleep

37
Q

Two operations: down and up

A

semaphore

38
Q

Up increments semaphore. If more than one process is asleep, _______________

A

wake a random process

39
Q

Variable that can be in one of two states, locked or unlocked

A

mutexes

40
Q

Good for thread packages in user space

A

mutexes

41
Q

Allows threads to block due to some condition not being met

A

Condition variable

42
Q

Two functions: wait and signal

A

Condition variable

43
Q

wait until condition is set to true

A

Condition variable wait

44
Q

sets condition to true, allowing one more to enter block

A

Condition variable wait

45
Q

Abstract data type which encapsulates shared resource

A

monitor

46
Q

concurrent process executes procedures to access shared resources

A

monitor

47
Q

only one process can execute code at a given time

A

monitor

48
Q
A