Lecture Qs Flashcards

1
Q

How many bits in the data bus and address bus?

A

64 bits

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

What is the size of the restricted address space that manufacturers usually use?

A

48 bits, RAM doesn’t need full 64

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

If you have processes of the same priority how are the selected?

A

Round robin

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

Are new tabs in google threads or processes?

A

Processes so that one tab doesn’t crash entire program.

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

Which thread will activate first after a spin unlock?

A

Unkown, spin locks aren’t fair, there is no set order.

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

What happens in a spin lock without thr_yield?

A

It will still work, but the loop will be moved to the end of the queue, and use more CPU than needed.

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

When is it acceptable to use a spin lock instead of mutex?

A

A small segment of code that doesn’t require waiting.

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

Are spin locks and mutexes fair?

A

Only mutex is fair.

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

In POSIX which threads are copied over during fork?

A

Only the thread calling fork.

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

What does the r stand for in ctime_r?

A

re entrant

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

Why is there a mutex lock along with the semaphore for the list class?

A

Because multiple threads could try to insert or remove at the same time.

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

What is starvation as opposed to a deadlock?

A

Resource just takes a while to free up, ex: taking a while to be able to write from too many readers in RW locks.

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

Which call waits until a network connection from a client arrives and returns a file descriptor for that client connection?

A

accept()

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

What is a grid vs a cluster of computers?

A

Cluster used for databases like google and meta. Grid represents home computers contributing to a common cause.

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

In the Internet Protocol used to send data on the Internet, which of the following is true about data packets?

a) packets may get lost
b) packets may get duplicated
c) packets may be corrupted
d) all of the above

A

d

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

next lecture 4/25