Lecture Qs Flashcards

(24 cards)

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

How can you identify what point in the network is causing a big delay?

17
Q

What prevents packets from being stuck in the internet in a routing loop?

A

Time to live, it decrements each time a packet is sent and once it hits zero its zone.

18
Q

How does ARP find the proper connection?

A

Broadcasts a signal if not on immediate local network. (I think, double check)

19
Q

What prevents DNS requests from flooding the internet?

A

IP address after DNS conversion is cached to save for later.

20
Q

Often asked on final:

What are the four things needed to connect to the internet?

A
  1. IP address (Current address)
  2. Subnet Mask (Send packets in same lan)
  3. Default router (Send packets outside lan)
  4. Default DNS server (convert name to IP)
21
Q

How does a packet get sent directly vs outside lan?

A

If after subnet mask there is a match with the network, can send locally. If not send to the default router to go outside lan

22
Q

What does the DHCP server do on a computers first connection to the internet?

A

Gives the subnet mask, router, dns server to allow connection.

23
Q

How many packets to open and close the connection?

A

3 to open, 4 to close.

24
Q

Next watch after 4/28