LectureMemMgmt

LectureMemMgmt - Memory, Names, Binding Based on slides...

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

View Full Document Right Arrow Icon
1 Memory, Names, Binding Based on slides developed by Dr. Lawrence Angrave University of Illinois at Urbana Champaign
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Contents Addressing Requirements for a Process Names and Binding, Loading, Compiling, Run- Time Storage hierarchy Simple Programming Overlays Resident monitor Multi-Programming Fixed Partitioning Relocation Register Swapping Lawrence Angrave (UIUC)
Background image of page 2
3 Names and Binding Naming = very deep theme that comes up everywhere Indirection Symbolic names Logical names Physical names Most used by application  programmers Converted by system programmers  of compilers, OS Lawrence Angrave (UIUC)
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Symbolic Names Symbolic names: known in a context or path File names Program names Printer/device names User names Variables Convenient to use/reference Lawrence Angrave (UIUC)
Background image of page 4
5 Logical Names Logical names: label a specific entity … but independent of specific physical entity Job number Major, minor device numbers uid, pid, gid Absolute address in program Lawrence Angrave (UIUC)
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Physical Names Physical names: address of entity Physical Inode address on disk or memory (track, cylinder, …) Entry point or variable address Memory-mapped register addresses Process control block address Difficult to use by programmers Therefore, system software (compilers, loaders, OS) are usually the ones that convert symbolic names/logic names to physical names Lawrence Angrave (UIUC)
Background image of page 6
7 Binding Time of Names Binding: map names to locations (values) Early binding … Late binding Different times Source program (.c file) Compile time Object module (.o file) Link time Load module Load time Run-time Lawrence Angrave (UIUC)
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Create object code gcc -c part1.c gcc -c part2.c gcc -o wowee part1.o part2.o gcc uses linker program 'ld' to link object code together. Lawrence Angrave (UIUC)
Background image of page 8
9 What does a process look like? (Unix) Process address space divided into “segments” text (code), data, heap (dynamic data), and stack he a p s ta c k   c o de initia lize d  da ta a ddre s s   2^n-1 a ddre s s   >= 0 Lawrence Angrave (UIUC)
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 Who Binds What? Heap : constructed and layout by allocator (malloc) compiler, linker not involved other than saying where it begins namespace constructed dynamically and managed by programmer (names stored in pointers, and organized using data structures) Stack : alloc dynamic (proc call), layout by compiler names are relative off of stack pointer managed by compiler (alloc on proc entry, dealloc on exit) linker not involved because name space entirely local: compiler has enough information to build it. : allocation static (compiler), layout (linker) compiler emits them and can form symbolic references between them (“jal _printf”) linker lays them out, and translates references Lawrence Angrave (UIUC)
Background image of page 10
11 Compiling Compiler: doesn t know where data/code should be placed in the process s address space assumes everything starts at zero emits symbol table that
Background image of page 11

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

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

This note was uploaded on 02/14/2012 for the course CSCE 313 taught by Professor Gu during the Spring '11 term at Texas A&M.

Page1 / 69

LectureMemMgmt - Memory, Names, Binding Based on slides...

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

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