Sunday, November 8, 2015

light weight process(LWP)

        Light Weight Process is created by Linux system to support better performance in multitasking programming. Two LWP shares common memory space and their context significantly less than the normal processes.
       
        When a child process created it is almost identical to its parent process and inherit all properties from parent process. it also receives a copy of parent address space. Parent and child share same page for code text but they do have their separate copies of stack and heap segment so the changes done by chide is invisible by parent process and vice versa.
       
        In multitasking programming where dependency exists between parent and child process this invisibility may leads to severe problems some time corrupting memory to crashing the entire execution.
       LWPs may share same resource and address space so changes done by one process is immediately noticed by all the process running together. Synchronization among the LWPs is quite possible so corruption of memory can be prevented. POSIX-compliant  pthread library widely used to create LWP and make them synchronized.

pthread related process creation and synchronization is discussed later in this blog.

No comments:

Post a Comment