进程管理:一组进程如何共享CPU
内存管理:一组进程如何共享内存
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
二级页表需要3次内存访问
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
优点:decrease memory need to store each page table,only one page table inthe system
不用为每个进程都存一个页表了,只需要维护一张表
缺点:
Paging and Segmentation
网友评论