Concurrency Flashcards

(15 cards)

1
Q

What is monitor?

A

A control abstraction one level higher then a semaphore a monitor controls access to recourses upon which threads can be accessed.

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

What is halting problem?

A

Is a orbitary computer program in which a computer program determines wether a program will stop or run forever.
The problem is to create a program that will analyse the input size and determine wether the program will halt.

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

What is the purpose of a sentinel node?

A

Does not contain data
Points to the first and last items in the list
To provide a way in to the list.

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

Prefix traversal?

A

NLR

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

Infix traversal?

A

LNR

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

Postfix?

A

LRN

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

What is starvation?

A

When a process is really aggressive and constantly takes a lock as soon as its released so other processes don’t get to use the recourse.

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

What is live-lock?

A

Is when to people are constantly walking in to each not allowing each other to proceed. Imagine this happening in a infinite loop. This is an example of live lock

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

Race condition?

A

Is when the counter is not being treated as atomic. The solution is to ensure exclusion of critical solutions.

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

Deadlock?

A

Is when two threads are simultaneously waiting for a lock to be released by another thread.

An example of deadlock is dining philosopher.

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

What is a semaphore?

A

Controls multiple recourses trying to access a shared recourse.

Semaphore can be added to the dining philosopher to resolve the problem as the waitor will control who sits down.

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

Wait

A

??

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

Notify

A

??

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

Notify all?

A

Bb

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

Load factor(hash tables)?

A

The ratio of elements in the table to its size. This is measure of how densely populated this table is. Thus for a table of size m with n elements currently in the table the load factor is n/m.

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