Enforcing Modularity

9
Enforcing Modularity Client / Service module per computer module per Virtual computer Kerne l Virtual processo r Virtual memory

description

Enforcing Modularity. Client / Service. module per computer module per Virtual computer. Virtual memory. Virtual processor. Kernel. Why VM:. -A can overwrite B’s memory. Mem. code. μProc. Mod A. ST R1,B. data. Mod B. Virtual Memory. VA  VM  Physical. Addr. VA. Address - PowerPoint PPT Presentation

Transcript of Enforcing Modularity

Page 1: Enforcing Modularity

Enforcing Modularity

Client / Servicemodule per computer

module per Virtual computer

Kernel Virtual processor

Virtualmemory

Page 2: Enforcing Modularity

Why VM:

-A can overwrite B’s memory

Mem

Mod A

Mod B

ST R1,B μProc.code

data

Page 3: Enforcing Modularity

Virtual Memory

code

code code

code

Disk

AddressSpace

VA

VA VM Physical Addr

Memory

Page 4: Enforcing Modularity

Simplified VM Hardware

LD VA, R1

pmar

VM(MMU)

μProc.

Mem VA

VA PA

PA

“page map address reg”

Page 5: Enforcing Modularity

20 bit 12 bit 212= 4096 words 32 bit VA Page # Offset

4096bytes

Page

Page

Mem PA

Page 6: Enforcing Modularity

Supervisory Module -Kernel

Kernel AS

pmar

μProc.

user / kernel

only kernel can change PMAR

maps

Page 7: Enforcing Modularity

Supervisor Call -SVC

SVC gate malloc

Set U / K KSet PMAR to kernel mapSave PCPC addr gate

Page 8: Enforcing Modularity

Kernel –Trusted intermediary

producer(put)

Consumer(get)

ES IPC Net Graphics

Graphics

Page 9: Enforcing Modularity

AS A AS B

Lib 1 Lib 1,2

Code A

Memory

Code 1

Code B

Code 2