PAGING-SHARED PAGES


  • Advantage of paging is sharing of common code.
  • This is important in a time sharing environment.
  • In multi programming system, when two or more user use program or file at same time. 
  • The MMU of OS share pages of the process with the users.
  • These pages are called shared pages.
  • Shared code

    1. One copy of read-only (re-entrant) code shared among processes (i.e., text editors, compilers,
         window systems).
    2. Shared code must appear in same location in the logical  address space of all processes.
    3. Each process keeps a separate copy of the code and data.
    4. The pages for the private code and data can appear  anywhere in the logical address space.

RE-ENTRANT CODE:(OR PURE CODE)

  • is non-self-modifying code.
  • If the code is re-entrant,then it never changes during execution.
  • Thus two or more processes can execute the same code at the same time.
  • Each process has its own copy of registers and data storage to hold the data for the process execution.


No comments:

Post a Comment