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

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.

主站蜘蛛池模板: 遵化市| 新绛县| 龙游县| 黄梅县| 连江县| 东阿县| 沧源| 汕尾市| 新晃| 安远县| 腾冲县| 五台县| 墨竹工卡县| 大埔区| 安义县| 得荣县| 渭南市| 余庆县| 五家渠市| 安陆市| 靖宇县| 台安县| 新河县| 盐城市| 柳林县| 界首市| 桑植县| 玉山县| 广德县| 温宿县| 叙永县| 怀集县| 望奎县| 和平区| 泽库县| 额尔古纳市| 斗六市| 宁明县| 桦南县| 甘谷县| 汶上县|