06_virtual_memory

06_virtual_memory - This Unit: Virtual Memory App App App...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 501 (Martin): Virtual Memory 1 CIS 501 Computer Architecture Unit 6: Virtual Memory Slides originally developed by Amir Roth with contributions by Milo Martin at University of Pennsylvania with sources that included University of Wisconsin slides by Mark Hill, Guri Sohi, Jim Smith, and David Wood. CIS 501 (Martin): Virtual Memory 2 This Unit: Virtual Memory • The operating system (OS) • A super-application • Hardware support for an OS • Virtual memory • Page tables and address translation • TLBs and memory hierarchy issues CPU Mem I/O System software App App App CIS 501 (Martin): Virtual Memory 3 Readings • Textbook (MA:FSPTCM) • Section 2.3, 6.1.1 CIS 501 (Martin): Virtual Memory 4 A Computer System: Hardware • CPUs and memories • Connected by memory bus I/O peripherals : storage, input, display, network, … • With separate or built-in DMA Connected by system bus (which is connected to memory bus) Memory Disk kbd DMA DMA display NIC I/O ctrl System (I/O) bus Memory bus CPU/$ bridge CPU/$
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CIS 501 (Martin): Virtual Memory 5 A Computer System: + App Software Application software : computer must do something Memory Disk kbd DMA DMA display NIC I/O ctrl System (I/O) bus Memory bus CPU/$ bridge CPU/$ Application sofware CIS 501 (Martin): Virtual Memory 6 A Computer System: + OS Operating System (OS): virtualizes hardware for apps Abstraction : provides services (e.g., threads, files, etc.) + Simplifies app programming model, raw hardware is nasty Isolation : gives each app illusion of private CPU, memory, I/O + Simplifies app programming model + Increases hardware resource utilization Memory Disk kbd DMA DMA display NIC I/O ctrl System (I/O) bus Memory bus CPU/$ bridge CPU/$ OS Application Application Application Application CIS 501 (Martin): Virtual Memory 7 Operating System (OS) and User Apps Sane system development requires a split • Hardware itself facilitates/enforces this split Operating System (OS) : a super-privileged process Manages hardware resource allocation/revocation for all processes Has direct access to resource allocation features Aware of many nasty hardware details Aware of other processes Talks directly to input/output devices (device driver software) User-level apps : ignorance is bliss Unaware of most nasty hardware details Unaware of other apps (and OS) Explicitly denied access to resource allocation features CIS 501 (Martin): Virtual Memory 8 System Calls • Controlled transfers to/from OS System Call : a user-level app “function call” to OS • Leave description of what you want done in registers • SYSCALL instruction (also called TRAP or INT) • Can’t allow user-level apps to invoke arbitrary OS code • Restricted set of legal OS addresses to jump to ( trap vector ) • Processor jumps to OS using trap vector • Sets privileged mode • OS performs operation • OS does a “return from system call” • Unsets privileged mode
Background image of page 2
CIS 501 (Martin): Virtual Memory 9 Interrupts Exceptions : synchronous, generated by running app • E.g., illegal insn, divide by zero, etc.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

06_virtual_memory - This Unit: Virtual Memory App App App...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online