官术网_书友最值得收藏!

Copy-on-write (COW)

Duplication of parent process to create a child needs cloning of the user mode address space (stack, data, code, and heap segments) and task structure of the parent for the child; this would result in execution overhead that leads to un-deterministic process-creation time. To make matters worse, this process of cloning would be rendered useless if neither parent nor child did not initiate any state-change operations on cloned resources.

As per COW, when a child is created, it is allocated a unique task structure with all resource entries (including page tables) referring to the parent's task structure, with read-only access for both parent and child. Resources are truly duplicated when either of the processes initiates a state change operation, hence the name copy-on-write (write in COW implies a state change). COW does bring effectiveness and optimization to the fore, by deferring the need for duplicating process data until write, and in cases where only read happens, it avoids it altogether. This on-demand copying also reduces the number of swap pages needed, cuts down the time spent on swapping, and might help reduce demand paging.

主站蜘蛛池模板: 鄂托克前旗| 松潘县| 江城| 扶余县| 乳源| 凉山| 襄城县| 尚义县| 临桂县| 尚义县| 荥阳市| 长垣县| 盐山县| 宁远县| 新营市| 望江县| 咸阳市| 福安市| 双牌县| 嘉鱼县| 古蔺县| 图木舒克市| 济宁市| 马龙县| 申扎县| 礼泉县| 姚安县| 佳木斯市| 卢氏县| 柳河县| 寿阳县| 嘉义县| 龙山县| 湖口县| 连云港市| 鄂托克旗| 苏尼特右旗| 塔河县| 温泉县| 科尔| 广元市|