07-main-memory - Main Memory Goals for Today Protection Address Spaces What is an Address Space How is it Implemented Address Translation Schemes

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

View Full Document Right Arrow Icon
Main Memory
Background image of page 1

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

View Full DocumentRight Arrow Icon
Goals for Today • Protection: Address Spaces – What is an Address Space? – How is it Implemented? • Address Translation Schemes – Segmentation – Paging – Multi-level translation – Inverted page tables
Background image of page 2
Virtualizing Resources • Physical Reality: Different Processes/Threads share the same hardware – Need to multiplex CPU (temporal) – Need to multiplex use of Memory (spatial) – Need to multiplex disk and devices (later in term) • Why worry about memory sharing? – The complete working state of a process and/or kernel is defined by its data in memory (and registers) – Probably don’t want different threads to even have access to each other’s memory (protection)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Single and Multithreaded Processes • Threads encapsulate concurrency – “Active” component of a process • Address spaces encapsulate protection – E.g. Keeps buggy program from trashing the system
Background image of page 4
Important Aspects of Memory Multiplexing • Isolation – Separate state of processes should not collide in physical memory. • Obviously, unexpected overlap causes chaos! • Sharing – Conversely, would like the ability to overlap when desired • for communication • Virtualization – Create the illusion of more resources than there exist in the underlying physical system
Background image of page 5

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

View Full DocumentRight Arrow Icon
Binding of Instructions and Data to Memory • Binding of instructions and data to addresses: – Choose addresses for instructions and data from the standpoint of the processor – Could we place data1, start , and/or checkit at different addresses? • Yes • When? Compile time/Load time/Execution time data1: dw 32 start: lw r1,0(data1) jal checkit loop: addi r1, r1, -1 bnz r1, r0, loop checkit: … 0x300 00000020 0x900 8C20 00C0 0x904 0C 000340 0x908 2021FFFF 0x90C 1420FFFF 0x D00
Background image of page 6
Multi-step Processing of a Program for Execution • Preparation of a program for execution involves components at – Compile time (i.e. “gcc”) – Link/Load time (unix “ld” does link) – Execution time (e.g. dynamic libs) • Addresses can be bound to final values anywhere in this path – Depends on hardware support – Also depends on operating system • Dynamic Libraries – Linking postponed until execution – Small piece of code, stub , used to locate the appropriate memory-resident library routine – Stub replaces itself with the address of the routine, and executes routine
Background image of page 7

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

View Full DocumentRight Arrow Icon
• Uniprogramming (no Translation or Protection) – Application always runs at same place in physical memory since only one application at a time – Application can access any physical address – Application given illusion of dedicated machine by giving it reality of a dedicated machine • Of course, this doesn’t help us with multithreading 0x00000000 0xFFFFFFFF Application Operating System Valid 32-bit Addresses
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2011 for the course CS 4410 taught by Professor Vollset during the Spring '07 term at Cornell University (Engineering School).

Page1 / 44

07-main-memory - Main Memory Goals for Today Protection Address Spaces What is an Address Space How is it Implemented Address Translation Schemes

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

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