Terminology Flashcards

1
Q

Synchronisation

A

Sharing of resources in careful and controlled manner

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

Condition Synchronisation

A

A gateway to a resources. A process can only proceed if some condition is true.

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

Mutual Exclusion

A

Only one process at time is allowed access to the resource

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

Liveness

A

All is well. Progress of processes is maintained.

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

Deadlock

A

A liveness failure. Multiple processes have access to a resurces each and each wants to access t that held by the other. Non one can give way and so the system locks.

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

Livelock

A

A liveness failure. A process is waiting for a condition to becme true but the condition can never become true.

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

Starvation

A

Several processes are continuously blocked from accessing a resource.

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

Four conditions of deadlock

A
  1. Shared resources
  2. Hold while waitng
  3. No pre-emption
  4. Cycle of processes holding on and waiting for each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Pre-emption

A

Ability to automatically interupt a process, without requiring its cooperation, to give way to other process to carry out its task.

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

Lost update

A

Uncontrolled access to a resources when one proces makes an update and another concurrent process coming along at the wrong tme, so the update is mssed or lost.

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

Race condition

A

An outcome depends upon a particular sequence of more than one process, but there is something amiss with the sequence. Can be avoided by enforcing mutual exclusion.

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

Enforcing mutual exclusion

A
  1. Atomic actions
  2. Critical regions protected by entry and exit protocols to allow controlled access to a resource.
  3. Semaphores
  4. Monitors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Entry protocol

A

Provides gateway to critical region allowing one process at time.

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

Exit rotocol

A

Sends signal that a process has left critical region and Entry Protocol can safely allow another process to enter.

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

Semaphore

A

Comprised of two elements: counter (non-negative integer) and queue of processes waiting to enter critical region. semWait decrements counter causing process which called it to wait. semSignal increments counter allowing proces to proceed. Conceptually, Smaphore simpler than Monitor.

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

Monitors

A

Complex data struture that holds protected data and provides only atomic operations to work on the data. Build upon semaphores.

17
Q

Java: synchronized

A

Java objects come with inherited lock. The lock is switched using the keyword synchronized which can lock methods and sections of code (not recommended). It is re-entrant lock.

18
Q

Java: wait-notify

A

Conditional synchronisaton mechanism (guarded lock) available within synchronized methods. Require when synchronisation of a condition is needed. Uses Java methods wait() and notifyAll() (notify() is not recommended).

19
Q

Re-entrant lock

A

If a process holds synchronized lock on an object and then comes upon another synchronized method of the same object, it continues without interruption. The locks are accumulated by the process, then released in turn.

20
Q

Java: wait()

A

At the beginning of a synchronized method, inside a loop.

21
Q

Java: notifyAll()

A

At the end of a synchronized method.

22
Q

Guarded lock

A

Conditional synchronisaton mechanism. See Java wait() and notifyAll().

23
Q

Countdown Latch

A

TODO

24
Q

@Entity

A

Simplifies access to database.

25
Q

@Table

A

TODO

26
Q

@Id

A

TODO

27
Q

@ManyToOne

A

TODO

28
Q

@JoinColumn

A

TODO

29
Q

@Remote

A

TODO

30
Q

@Stateful

A

An interactive session, used by exactly one client, not shared.

31
Q

@Stateless

A

Session beans whose instances have no conversational state for a specific client.

32
Q

@PersistenceContext

A

TODO

33
Q

@EJB

A

TODO

34
Q

Two-tier architecture

A

Example: client-server, RMI (JDBC/SQL is low level mechanism and is not an architectural separation between server and database)

35
Q

Three-tier architecture

A

Architectural separation between client, server and database tiers. Example: EJB