Unit 03 Flashcards

1
Q

atomic action

A

An indivisible action – that is, either the action happens completely, or it does not happen at all. See also fine-grained and coarse-grained atomic actions.

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

atomic objects

A

Also known as fully synchronised objects, atomic objects are objects which have all their methods declared as synchronized. The data is fully encapsulated and there is no public access to the data fields of the object apart from through such synchronized methods.

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

binary semaphore

A

A semaphore used to guard exclusive access to a shared resource.

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

blocking semaphore

A

A semaphore used for the synchronisation of cooperating processes.

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

buffer

A

An area of temporary storage to allow a reader and writer to operate at different rates.

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

busy-waiting

A

A technique whereby a process repeatedly checks to see if a condition is true such as waiting for keyboard input or waiting for a lock to become available.
See also spin lock.

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

circular buffer

A

A buffer (data storage area) which is logically said to be circular – when a process gets to the end of the buffer, it can start again at the beginning.

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

coarse-grainedatomic action

A

An atomic action implemented by a sequence of finegrained atomic actions.

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

condition synchronisation

A

A mechanism for ensuring that a process is blocked if some condition is not fulfilled (for example, a producer process requires a buffer to be not full for it to be able to proceed).

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

condition variables

A

Used in the operations of a monitor to provide conditional synchronisation.

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

consistent state

A

A sensible state for a system as a whole (or the individual objects within the system) to be in, such that it conforms to a given specification. It usually refers to the values that are held by the variables in the system and whether these are within the range as set out by the specification.

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

counting semaphore

A

A semaphore used to control access to shared resources – may be used for any number of resources.

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

critical region

A

A sequence of instructions that access shared data.

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

deadlock

A

A situation in which a process is prevented, for all time, from continuing because it is waiting for an event that will never happen, or for a resource that will never become free.

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

entry protocol

A

The code that must be executed by a process prior to entering its critical region – it is designed to prevent the process from entering its critical region if another process is already in its associated critical region. An entry protocol together with its associated exit protocol should ensure mutual exclusion.

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

exit protocol

A

The code that a process must execute immediately on completion of its critical region to ensure that other waiting processes may now enter their associated critical regions. Together, entry protocols and exit protocols are designed to ensure mutual exclusion.

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

fairness

A

Fairness is concerned with guaranteeing that a process will be given the chance to proceed, regardless of how other processes behave.

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

fine-grained atomic action

A

An atomic action implemented directly by an indivisible machine instruction.

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

fully synchronised objects (See atomic objects.)

A

Are objects which have all their methods declared as synchronized. The data is fully encapsulated and there is no public access to the data fields of the object apart from through such synchronized methods.

20
Q

guarded suspension

A

A method invocation is suspended until a condition (i.e. guard) holds. Equivalent to condition synchronisation.

21
Q

inconsistent state

A

The state a system as a whole, or the individual objects within it, may end up in as a result of a violation of the specification for that system.

22
Q

interrupt disabling

A

When interrupts are disabled, the current executing process cannot be interrupted and will complete its execution.

23
Q

livelock

A

A situation where a process is continually executing an operation without getting nearer to a condition becoming true.

24
Q

liveness

A

This property asserts that a program must make some form of progress, and not come to a halt or run indefinitely without achieving its goal.

See also safety.

25
Q

lock

A

A file or object is said to be locked when processes are prevented from accessing it (usually because another client/process is accessing it). In Java, each object has a lock.

26
Q

lost update problem

A

The situation arising when a result made by one process has been overwritten (and hence lost) by another process. This occurs if uncontrolled access to a shared resource has been allowed.

27
Q

monitors

A

So-called Hoare monitors are data structures that provide operations which access encapsulated shared data under mutual exclusion.

The concurrency mechanism implemented by the Java language, with use of a lock and synchronised methods, is said to be based on monitors.

28
Q

multi-party operation

A

An operation that involves access to several objects. Since a synchronised multi-party operation requires several locks (one for each object in the operation), the programmer should be aware of the potential for deadlock.

29
Q

multiple readers, single writer

A

A classic problem in the study of mutual exclusion and condition synchronisation, in which only one writer is allowed to write at a time, but multiple readers are allowed to read.

30
Q

mutual exclusion

A

An approach that ensures only one process at a time can access a shared resource.

31
Q

mutual exclusion protocol

A

A set of rules (protocol) which, if obeyed by a number of processes that wish to access a shared resource, will enforce mutual exclusion.

32
Q

producer–consumer model

A

A model in which two processes work together and share data in such a way that one process assumes the role of producer (i.e. writes to the data resource) and the other assumes the role of consumer (i.e. reads from the resource).

33
Q

protocol

A

The rules that govern an interaction between different components.

34
Q

race conditions

A

Race conditions exist if the final outcome of a process is dependent on the timing or sequence of other processes (as if the processes are ‘racing’ each other).

35
Q

re-entrant locking

A

The locking mechanism used in Java. If a thread holds the lock for an object, and it invokes another synchronized method for the same object, it is allowed to continue. This means that under these circumstances no deadlock will arise.

36
Q

rolling back state

A

The act of returning the system’s state (usually the variables) back to how it was before an event occurred (such as an exception).

37
Q

safety

A

This property asserts that nothing bad happens during the execution of a program.

See also liveness.

38
Q

semaphore

A

A type of object that is used to protect a resource from concurrent access by multiple processes. It does this through the use of two operations semWait and semSignal. Internally, a semaphore has a data field that holds its value and a queue that is used to hold blocked processes.

39
Q

shared resources

A

A resource, which may be either data (in the form of variables or files) or hardware, that a number of processes have access to.

40
Q

single anonymous condition variable

A

Java’s concurrency mechanism allows just one wait set for all the threads that have called wait on a given object’s lock. This acts as the condition variable. This is in contrast to so-called Hoare monitors which can have multiple condition variables, and a queue for each specific condition. Therefore, we say that Java has a single condition variable, which is anonymous as it does not belong to any particular condition.

41
Q

spin lock

A

A lock where the thread simply waits in a loop (‘spins’), repeatedly checking until the lock becomes available. This is also known as busy-waiting because the thread remains active but is not performing a useful task.

42
Q

starvation

A

Starvation occurs when a runnable process is overlooked indefinitely by the scheduler.

43
Q

synchronisation

A

The need for different processes to synchronise their operations by waiting for each other. In Java, the keyword synchronized is used for methods, so that only one thread can execute the method at a time, forcing the other threads to wait.

44
Q

test-and-set (TAS)

A

A special atomic operation that tests and sets a Boolean, provided by the operating system as an indivisible machine instruction.

45
Q

thread safety

A

A class is thread safe if it can be executed concurrently by multiple threads without the shared data getting into an inconsistent state.

46
Q

wait set

A

The set of threads that have called wait and are waiting to be notified. Each object in Java has one wait set.

47
Q

wait–notify mechanism

A

The Java mechanism to implement condition synchronisation. A thread calls wait and will be blocked as long as the condition it is waiting on is not satisfied. Another thread calling notify or notifyAll can release this thread from its blocked state.