OperatingSystemsCh7, part 2Memory Management from the Kernel's Perspective:Virtual Memory Support1
Operating Systems Ch7, part 2 Memory Management from the Kernel’s Perspective: Virtual Memory Support 1
MemorymanagementHowto use the addresses to accessthe memory device?Local variableHowdomultipleprocess sharetheDynamically-allocatedsamephysicalmemorydevice?memoryHowto supportlargeprocess?Global variableHow does the CPU read what it wantsfromthememorydevice?Code +constantsProcessThekernel andthehardware are doinglots of managements.2
2 Memory management Global variable Local variable Dynamically-allocated memory Code + constants Process How to use the addresses to access the memory device? How do multiple process share the same physical memory device? How to support large process? How does the CPU read what it wants from the memory device? . The kernel and the hardware are doing lots of managements
Memory Management- Virtual memory;MMU implementation &pagingsDemand pagingPage replacement algorithmsAllocation of frames;(intel)Core"i73
3 Memory Management - Virtual memory; - MMU implementation & paging; - Demand paging; - Page replacement algorithms; - Allocation of frames;
CPU working-illustration thatyoumay know. Let's review the“fetch-decode-execute" cycle!memory busThisinstruction says(intel)"Movethe memoryCorei7valuein0x12345678totheregisterEAX".PCOXABCDEF00OXABCDEF00instructionmov0x12345678%EAXEAX0x000000000x12345678The integervalue:an integer0x0000000A4
CPU working – illustration that you may know • Let’s review the “fetch-decode-execute” cycle! 4 PC 0xABCDEF00 instruction memory bus EAX 0x00000000 0xABCDEF00 0x12345678 an integer mov 0x12345678 %EAX This instruction says: “Move the memory value in 0x12345678 to the register EAX”. The integer value: 0x0000000A
CPU working-illustration that you mayknow Let's review the “fetch-decode-execute" cycle!CPU decodesmemory busThis instruction says(intel)"Move the memoryCore"i7valuein0x12345678tothe register EAX".PCOXABCDEF00OXABCDEF00instructiormOv0x12345678%EAXEAX0X0000000A0x12345678The integer value:an integer0x0000000AHowtousetheaddresses?5
CPU working – illustration that you may know • Let’s review the “fetch-decode-execute” cycle! 5 PC 0xABCDEF00 instruction memory bus EAX 0x00000000 0xABCDEF00 0x12345678 an integer mov 0x12345678 %EAX 0x0000000A 1 3 2 CPU decodes This instruction says: “Move the memory value in 0x12345678 to the register EAX”. The integer value: 0x0000000A How to use the addresses?