美文网首页
OS-Memory Management

OS-Memory Management

作者: 一只小小小小訸 | 来源:发表于2018-06-23 15:47 被阅读0次

进程管理:一组进程如何共享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

相关文章

网友评论

      本文标题:OS-Memory Management

      本文链接:https://www.haomeiwen.com/subject/qdklyftx.html