Virtualizing Resources • Physical Reality: Different Processes/Threads share the same hardware – Need to mul-plex CPU (Just finished: scheduling) – Need to mul-plex use of Memory (Today) – Need to mul-plex disk and devices (later in term) – The complete working state of a process and/or kernel is defined by its data in memory (and registers) – Consequently, cannot just let different threads of control use the same memory – Probably don’t want different threads to even have access to each other’s memory (protec-on) • Physics: two different pieces of data cannot occupy the same loca-ons in memory
• Why worry about memory sharing?
Memory Hierarchy of a Modern Computer System • Take advantage of the principle of locality to: – Present as much memory as in the cheapest technology – Provide access at speed offered by the fastest technology Processor Control Second Level Cache (SRAM) Main Memory (DRAM) Secondary Storage (Disk)
Tertiary Storage (Tape)
On-Chip Cache
Registers
1s
100s
Datapath
Speed (ns): Size (bytes):
10s-‐100s Ks-‐Ms
100s Ms
10,000,000s
10,000,000,000s
(10s ms)
(10s sec) Gs Ts
Background • Program must be brought