Week 4 - Multicore Systems Flashcards

1
Q

What is the cache coherence problem?

A

Multiple cores are running part of a program. They each have a copy of a shared object in their cache. But only the last core to write to the object will have an up to date copy.

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

How do you solve the cache coherence problem?

A

Writing to the memory location where the object is stored must cause all other copies to be removed from the cache they are in.

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

What is the MSI protocol?

A

A simple cache coherence protocol, where each cache line has a state modified, shared or invalid.

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

How does the MSI protocol work?

A

When the shared object is updated in one cache it is marked as modified, and all other copies of that object that are marked as shared are marked as invalid. The shared object is then updated in the shared cache. If another cache wants to use the shared object it will load the copy from the shared memory.

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

Multiprogramming

A

Keeping multiple programs in main memory, ready for execution

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

Multiprocessing

A

A computer using more than one CPU at the same time

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

Multitasking

A

Multiprogramming with a round robin scheduling algorithm.

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

How does a race condition occur?

A

When 2 processes modify the same shared piece of data at the same time, and so one process writes over the result of the other process, leading to an incorrect result.

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

What is a semaphore?

A

A integer variable that is shared between threads to control access to the critical section of a program.

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

What is a binary semaphore also known as?

A

mutex lock

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

What is a spinlock?

A

A locking mechanism that when a thread acquires it, makes the thread wait in a loop until the lock is available

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

Degree of multiprogramming

A

The number of processes that a single-processor system can handle efficiently

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

What affects the degree of multiprogramming of a system?

A

Amount of memory available (More memory, more processes can be stored)
Operating system (how fairly does the OS allocate resources)
Memory and disk access speeds

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