Lesson 4d Flashcards

parallel

1
Q

How do you ensure safety when client server? (even on the same machine)?

A

make sure that the client and server are in different address spaces (protection domains)

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

What is impacted by having separate client server address spaces?

A

performance

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

what happens in terms of address space during RPC?

A

The client traps into the kernel and copies to a buffer there. This buffer is sent to the server. On return the server traps into the kernel, fills out a buffer, and returns that to the client. 2 kernel traps, 2 context switches, 1 procedure execution, 4 copying stuff from user address space to kernel

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

what is a main performance concerns when comparing function calls and RPC?

A
  • RPC happens at runtime

- func call happens at compile time (I guess they mean linking and optimization)

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

what is a main concern that needs to be optimized for RPC?

A

Copying Overhead

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

what makes the RPC msg for the client

A

client stub

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

Steps in copying overhead

A

1) client stub on the client stack to RPC msg
2) RPC msg to kernel buffer
3) kernel buffer to server domain
4) server domain to server stub on the server stack

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

what to focus on during optimization

A

Not one-time cost. Focus on recurring cost

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

Name server for RPC

A

place where client can find out which procedures are available on the server and retrieve binding information

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

what is the PD of RPC

A

procedure descriptor contains, Entry Point (address), Stack Size (max space), Number of Calls (simultaneous calls handled)

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

how are address spaces shared

A

a shared memory region is created that is mapped to the client address space and the server address space

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

where does the server stub copy the arguments when making RPC cheap?

A

copies from the a-stack (shared memory) into the e-stack (execution stack)

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

where does the server place results (when making RPC cheap)

A

Back into shared memory (a-stack). User space

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

what happens during the return kernel traps (when making rpc cheap)

A

thre thread is adjusted to continue where the client left off (re-doctor)

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

different between original rpc copy overhead and cheap version?

A

Original: rpc msg -> kernel buffer -> server domain -> server stack (4)
New: a-tack -> server stack (2)

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

what does a-stack stand for?

A

argument stack

17
Q

what is the bo in rpc initial setup

A

the binding object

18
Q

how are calls made cheap

A

client fills out the a-stack in shared memory and copies results from shared memory

19
Q

what is copied into kernel when making rpc cheap?

A

the bo (binding object) during a kernel trap

20
Q

what does the kernel do with the bo?

A

pulls out the PD (procedure descriptor) if on the same machine uses the client thread, adjust the thread to start at “server” address (from PD) and setup the e-stack (execution stack)

21
Q

where does the copy happen in the cheap version vs the original

A

in user space vs. kernel space (original)

22
Q

what is a cost hit that comes from moving the a-stack method?

A

loss of locality

23
Q

How can we take advantage of RPC on SMP

A
  • Preload server domain, - Keep caches warm
24
Q

What do they mean by “pre-load” server domain?

A

One cpu is tied to one server domain. No other work is done on that processor so the cache stays hot

25
Q

why do we want to use RPC locally for services

A

When you put services in their own protection domain you are adding protection to the system (integrity)