You are on page 1of 18
‘hs £ Memory Management Memory management is a subsystem that © allocates memory for all processes 1ps between logical memory of processes and physical memory of the compter Chapter 8: Memory Management Strategies ‘* Assumption: a process or processes can be entirely placed into physical memory ‘= Chapter 9: Virtual Memory Management ‘* Assumption: a process or processes are too large to be entirely placed into physical memory Referens ‘A Quant hapter 5 Mer ratchy Design, Computer Architocture ~ Cpa ee Pe “ Chapter 8: Memory-Management Strategies & Chapter 8: Memory-Management Strategies = Background Address Binding = Logical and Physical Address = Contiguous Memory Allocation = Paging Structure of the Page Table = Segmentation ‘= Example: The Intel Pentium mtn Stim ie a ‘stacch Caln d mp es & Background i = Von Neumann Architecture © CPU. Memory, UO ‘Torun a program, i mut be brought (rom dik) Into memory ad plced witin a process Memory Hierarchy — the Bala jut — By taking advantage ‘© Present the user wi £ Memory Hierarchy of a Modern Computer System * inciple of locality: 15 much memory as Is. le in the cheapest pen tne technology. * Provide access a the speed offered by the fastest technology. racer ind Contr Main Elllog Memory asmaol El 12 2 aes: Sus nee 10s s Ks Ms 1 Sisslag siboege General Principles of Memory ‘¢ Temporal Locality: referenced memory is likely to be referenced again 1000 (o.9 code and data being accessed within a loop) ‘Spatial Locality: memory close to referenced memory is likely to be memory closer to processor is stored and transfered at a memory level » Block: minimum unit t ‘© Hit: Data Is found in the desired location at that memory level ‘© Miss: Data is not found in the desired location at that memory level ‘© Miss rate: percentage of time item not found in upper level tt an ag oF From gcc-S gcc eau, Hsneniile [Source program in G language: Foo. source code to process ‘Assembly program: £00. Multistep Processing of a User Program inves ud Gay od sn + dbynewic Wile CVuwirder & yee atl ds Flernouiaveredle ye) Brocess Memory Layout unin heap (reteset untme by metoo) ‘ead-nly segment ‘xoeoascea| (init text, toda) C ° General Linux mney rns » loaded tom the racial fin | An Example C Program void Aint x) ( void Clint 9) { ant ¥; o y void main() { float PB; ? void B(float R) { 8, T: BIR); Cregeen a maven cn a ES Activation Records in Process’s Stack main calls B - Parma fo Bealls A an [ferment AcallsC ‘ee ae wm 6.12 Binding of instructions and Data to Memory © Address binding of instructions and data to memory addresses can happen at three different stages ‘© Compile time: If memory focation known a priori, absolute code can be generated; must recompile code if starting location changes * Load time: Must generate relocatable code if memory location is not known at compile time © Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.9., base and limit registers) ming Son Peso ae

You might also like

  • Os Chap07ex
    Os Chap07ex
    Document11 pages
    Os Chap07ex
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap10
    Os Chap10
    Document12 pages
    Os Chap10
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap11
    Os Chap11
    Document14 pages
    Os Chap11
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap07
    Os Chap07
    Document11 pages
    Os Chap07
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap06ex
    Os Chap06ex
    Document8 pages
    Os Chap06ex
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap05
    Os Chap05
    Document12 pages
    Os Chap05
    Kanit Wongsuphasasawat
    No ratings yet
  • Os Chap06
    Os Chap06
    Document16 pages
    Os Chap06
    Kanit Wongsuphasasawat
    No ratings yet