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

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.

主站蜘蛛池模板: 应城市| 海盐县| 扶沟县| 开江县| 海淀区| 吕梁市| 怀来县| 朔州市| 滨海县| 松江区| 淳化县| 望谟县| 饶平县| 永仁县| 汕头市| 安阳县| 盱眙县| 惠东县| 涡阳县| 鄯善县| 渭南市| 井冈山市| 枞阳县| 密山市| 伊宁市| 古蔺县| 普兰店市| 库尔勒市| 万源市| 东台市| 凤冈县| 山阴县| 澎湖县| 炉霍县| 大化| 利津县| 定日县| 阜南县| 平果县| 屏山县| 谢通门县|