main-memory-08 - Main Memory Announcements Homework 3 is...

Info iconThis preview shows pages 1–10. 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
Announcements Homework 3 is available via the website It is due Wednesday, October 3rd Make sure to look at the lecture schedule to keep up with due dates!
Background image of page 2
Goals for Today Protection: Address Spaces What is an Address Space? How is it Implemented? Address Translation Schemes Segmentation Paging Multi-level translation Paged page tables Hashed page tables Inverted page tables
Background image of page 3

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

View Full DocumentRight Arrow Icon
Virtualizing Resources Physical Reality: Different Processes/Threads share the same hardware Need to multiplex CPU (finished earlier: scheduling) Need to multiplex use of Memory (Today) 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 4
Recall: 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 5

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

View Full DocumentRight Arrow Icon
Important Aspects of Memory Multiplexing Controlled overlap: Separate state of processes should not collide in physical memory. Obviously, unexpected overlap causes chaos! Conversely, would like the ability to overlap when desired for communication Translation: Ability to translate accesses from one address space ( virtual ) to a different one ( physical ) When translation exists, processor uses virtual addresses, physical memory uses physical addresses Side effects: Can be used to avoid overlap Can be used to give uniform view of memory to programs Protection: Prevent access to private memory of other processes Programs protected from each other themselves
Background image of page 6
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 7

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

View Full DocumentRight Arrow Icon
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
Background image of page 8
Recall: Uniprogramming Uniprogramming (no Translation or Protection) Application always runs at same place in physical memory since only one application at a time
Background image of page 9

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

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

Page1 / 56

main-memory-08 - Main Memory Announcements Homework 3 is...

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

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