進(jìn)程管理:一組進(jìn)程如何共享CPU
內(nèi)存管理:一組進(jìn)程如何共享內(nèi)存
stall ,cache
memory和register都是access directly for cpu,
memory: many cycles(2 or more)
register:one cycle of the cpu clock
所以cpu needs to stall frequently (intolerable)
所以在memory與cpu之間加入了cache
cache的思想
Copying information into faster storage system
When accessing, firstcheck in the cache,?
if In:useit directly?
Not in:getfrom upper storage system,andleave a? copy inthe cache?
Memory protection
1.A pair of base and limit registers define the logical address space
2.OS has unrestricted access to both monitor and user's memory
3.Load instrutions for the base/limit registers are privileged
二級(jí)頁(yè)表需要3次內(nèi)存訪問
Structure of the Page Table
1.hashed page tables
algorithm:1.the virtual page number is hashed into a page table
? ? ? ? ? ? ? ? 2.vitual page numbers compare in the chain searching for a match
? ? ? ? ? ? ? ? 3.if a match is found,the corresponding physical frame is extracted
2.inverted page tables
one entry for each real page of memory
? ? ? ? 1.entry consists of the virtual address of the page stored in that real memory location
? ? ? ? 2.with information about the process that owns that page
優(yōu)點(diǎn):decrease memory need to store each page table,only one page table inthe system
? ? ? ? ? ? 不用為每個(gè)進(jìn)程都存一個(gè)頁(yè)表了陵像,只需要維護(hù)一張表
缺點(diǎn):