Ordering Flashcards

1
Q

what is asynchronous execution

A

we cannot predict the order two threads will be scheduled

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

what is a race condition

A

an element that has different values based on the synchronisation of operations before it

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

how can we create ordering or synchronisation

A

barrier

thread join

mutual exclusion

asynchronous message passing

synchronous message passing

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

what is a thread join

A

two threads join together and proceed as a single thread

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

what is asynchronous message passing

A

send the appropriate information before proceeding

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

what is synchronous message passing

A

at a determined point, the first process blocks and waits for the other to reach its communication point. then a message is sent

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

what is mutual exclusion

A

a mutex is a Boolean flag that prevents or allows progress.

it controls access to a critical section.

stored in main memory

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

when do race conditions occur

A

when behaviour is non deterministic

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

what is a semaphore

A

a means of implementing access control.

start with a value that is incremented (v) and decremented (p)

if value is 0, process must block. when exiting, signal v will increment the semaphore

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

what is signal and wait

A

IPC

there are times a process should not proceed until something else has happened.

in a critical section: process must wait, then sigal once it has left

in semaphores: p and v

in queues: if a process tries to read an empty buffer it must wait until it receives a wakeup

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

what is a memory barrier

A

instruction that causes all memory operations before it to be complete before starting operations after it.

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