stack stack heap heap data data text text program a
play

Stack Stack Heap Heap Data Data Text Text Program A Program - PowerPoint PPT Presentation

Stack Stack Heap Heap Data Data Text Text Program A Program B Stack Stack Text Heap Heap Data Data Text Text Text Program A Program B Physical Memory Stack Stack Stack Heap Stack Kernel Heap Heap Data Heap Data


  1. Stack Stack Heap Heap Data Data Text Text Program A Program B

  2. Stack Stack Text Heap Heap Data Data Text Text Text Program A Program B Physical Memory

  3. Stack Stack Stack Heap Stack Kernel Heap Heap Data Heap Data Data Text Text Text Data Program A Program B Text Physical Memory

  4. ● ○ ● ●

  5. ● ○

  6. ● ○

  7. ● ● ●

  8. ● ○ ○ ■ ○ ■ ● ○ ● ○ ○ ○

  9. ● ● ●

  10. ● ● ●

  11. Stack Stack Stack Stack Kernel Heap/File Heap/File Heap/File Heap/File Data Data Vim Vim Vim Data Data Vim 1 Vim 2 Physical Memory

  12. ● ● ○ ● ● ●

  13. ● ○ ● ○ ●

  14. ● ● ● ● ○ ○

  15. 3 1 1 1 9 8 7 6 5 4 3 2 1 0 1 2 1 0 4KiB-aligned Page Address Avail G S W A D T U R P ● Available: Free for the OS to use. If P is unset, all bits are available. G: If 1, page is global and TLB will not update it. ● ● S: If 1, this is a 4MiB page, otherwise a 4KiB page. W: If 1, page has been written to. ● ● A: If 1, page has been read or written to. (OS is responsible for clearing the bit.) D: If 1, disable caching. ● ● T: If 1, page is write-through, otherwise write-back. U: If 1, page is user-accessible, otherwise only supervisor-accessible. ● ● R: If 1, page is read-write, otherwise it is read-only. P: If 1, page is in memory, otherwise it is not (page fault). ● Items in red are specific to page directory entries (1st level). ● ● Items in blue are specific to page table entries (2nd level).

  16. 3 1 1 1 9 8 7 6 5 4 3 2 1 0 1 2 1 0 4KiB-aligned Page Address Avail G S W A D T U R P ● Available: free for the OS to use. If P is unset, all bits are available. G: If 1, page is global and TLB will not update it. ● ● S: If 1, this is a 4MiB page, otherwise a 4KiB page. W: If 1, page has been written to. ● ● A: If 1, page has been read or written to. (OS is responsible for clearing the bit.) D: If 1, disable caching. ● ● T: If 1, page is write-through, otherwise write-back. U: If 1, page is user-accessible, otherwise only supervisor-accessible. ● ● R: If 1, page is read-write, otherwise it is read-only. P: If 1, page is in memory, otherwise it is not (page fault). ● Items in red are specific to page directory entries (1st level). ● ● Items in blue are specific to page table entries (2nd level).

  17. ● ● ○ ○

  18. ● ○ ● ○ ● ○ ○

  19. Stack RW RW Stack Heap/File RW RW Heap/File Data Sh R Data Vim Vim Sh RX Sh RX P1 Page Page P2 Table Table Write Physical Memory

  20. Stack RW RW Stack Copy Heap/File RW RW Heap/File Data Sh R Data Vim Vim Sh RX Sh RX P1 Page Page P2 Table Table Write Physical Memory

  21. Stack RW RW Stack Copy Heap/File RW RW Heap/File Data Sh R Data Vim Vim Sh RX Sh RX P1 Page Page P2 Table Table Write Physical Update Memory reference counter

  22. ● ● ○

  23. ● ○ ●

  24. ● ○ ● ○ ○ ○ ○ ○

  25. ● ● ○ ○ ○ ●

  26. ● ● ● ●

  27. 32 bits x86: ● Addresses have 32 bits

  28. 10 10 12 DIR TABLE OFFSET x86: ● Addresses have 32 bits

  29. 10 10 12 DIR TABLE OFFSET PTBR DIR 4KiB 1024 entries x86: ● Addresses have 32 bits Frames and pages are 4KiB ●

  30. 10 10 12 DIR TABLE OFFSET PTBR DIR 4KiB 1024 entries x86: ● Addresses have 32 bits Frames and pages are 4KiB ●

  31. 10 10 12 DIR TABLE OFFSET PTBR DIR TABLE 4KiB 1024 entries 4KiB x86: 1024 entries Addresses have 32 bits ● ● Frames and pages are 4KiB ● Each page table entry has 32bits

  32. DIR TABLE OFFSET PTBR DIR TABLE 4KiB 1024 entries 4KiB x86: 1024 entries Addresses have 32 bits ● ● Frames and pages are 4KiB ● Each page table entry has 32bits

  33. Physical Memory DIR TABLE OFFSET PTBR Frame DIR TABLE 4KiB 1024 entries 4KiB x86: 1024 entries Addresses have 32 bits ● ● Frames and pages are 4KiB ● Each page table entry has 32bits

  34. Physical Memory DIR TABLE OFFSET PTBR Frame DIR TABLE 4KiB 1024 entries 4KiB x86: 1024 entries Addresses have 32 bits ● ● Frames and pages are 4KiB ● Each page table entry has 32bits

  35. Physical TLB Memory DIR TABLE OFFSET PTBR Frame DIR TABLE 4KiB 1024 entries 4KiB 1024 entries

  36. Physical TLB Memory DIR TABLE OFFSET PTBR Frame DIR TABLE 4KiB 1024 entries 4KiB 1024 entries

  37. ● ● ○ ○ ○ ■ ■ ● ○ ●

  38. ● ○ ●

  39. ● ○ ● ○ ○ ○

  40. ● ○ ○ ○ ■ ■ ● ● ○ ●

  41. ● ● ● ● ○

  42. ● ○ ○ ● ○ ○ ○ ● ○

  43. ● ●

  44. ● ○ ● ○ ● ○

  45. 3 1 1 1 9 8 7 6 5 4 3 2 1 0 1 2 1 0 4KiB-aligned Page Address Avail G S W A D T U R P ● Available: free for the OS to use. If P is unset, all bits are available. G: If 1, page is global and TLB will not update it. ● ● S: If 1, this is a 4MiB page, otherwise a 4KiB page. W: If 1, page has been written to. ● ● A: If 1, page has been read or written to. (OS is responsible for clearing the bit.) D: If 1, disable caching. ● ● T: If 1, page is write-through, otherwise write-back. U: If 1, page is user-accessible, otherwise only supervisor-accessible. ● ● R: If 1, page is read-write, otherwise it is read-only. P: If 1, page is in memory, otherwise it is not (page fault). ● Items in red are specific to page directory entries (1st level). ● ● Items in blue are specific to page table entries (2nd level).

  46. ● ○ ● ○ ● ○

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend