CS485G Spring 2015 56
(a) Each process gets a uniform linear address space that does not
contain any addresses belonging to any other process or to the
kernel.
(b) The kernel can limit access to parts of that linear address space,
making some execute/read-only (the text), other parts modi-
fiable (data, stack), other parts inaccessible (gap between data
and stack).
(c) The kernel can let processes share read-only parts of their ad-
dress space to save space and loading time.
(d) It is not necessary for all the virtual memory of a process to be
in physical memory for it to run.
3. Cache view of memory
(a) The entire virtual address space of a process is on disk.
(b) The currently active part of the virtual address space is cached
in physical memory.
(c) The currently active part of physical memory is cached in L3,
L2, or L1 caches (closer to the CPU).
(d) The compiler attempts to keep the most heavily used informa-
tion in registers, which are in the CPU itself.
4. MMU tables
(a) Typically the table is a page table.
(b) Virtual memory is chunked into pages, typically 4KB long.
(c) Each page has an entry in the page table. If addresses are 32
bits long, and a page is 4KB (12 bits) wide, a page table has 2
20
entries. Each entry contains (x86):
i. Present/missing (1 bit)
ii. Page frame (20 bits, gives page frame number)
iii. Whether the page has been recently accessed (1 bit)
iv. Whether the page has been written and is dirty (1 bit)
v. Does the process have write permission to the page (1 bit)
vi. Does the CPU have access permission in non-privileged mode
(1 bit)
vii. Caching strategy (2 bits)
viii. Normal page size (4KB) or extended (4MB) (1 bit)
ix. TLB caching advice (1 bit)
Kommentare zu diesen Handbüchern