Explain the concept of copyonwrite used by the for k system

Explain the concept of \"copy-on-write\" used by the for k() system call. The inverted page tables take less memory than regular page tables but they can be slower. What can be done to mitigate the performance issue?

Solution

1-

fork() creates a new copy known as child process of the defined process (the parent). They are distinguish by PID. Of the processes In a traditional fork this means copying the memory in use by the parent when creating the child ie same memory size is allocated to child. This can be quite expensive, especially for large processes as there is a lot of memory to be used in this approch

Copy-On-Write avoids this expense by being lazy,it optimizes memory usages. Rather than copy all the memory at a single time it pretends it was copied and only actually copies when the parent process and child process need to hold some different values or set of values at the same address. The child is provided with a view abstraction of memory by having the virtual memory segments backed by the same physical memory as the parent process. If either process writes to memory the parent retains the physical page and the child is given a new one with the correct the stored value.

2-

The inverted page table is comprises of sorted physical address,but looks up occours on virtual addresses, the complete table is searched from starting in order to search for a match,this would take a lot of time and decrease performance of the system.In order to increase the performance we use a hash table to limit thwe number of searches to a single page or some less number of pages.As each access to the hash table create a memory refrence to the procedure, so one there is one memory refrence requires atleast two real memory reads one for the page table and the other for hash table entry .To improve performance ,recall that the translation lookaside buffer is searced first,before the hash table is consulted.

 Explain the concept of \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site