Thursday 13 October 2011

Tugasan 1,2&5

TUGASAN 1


Memory management especially the objectives and memory management concept. Elaborate on virtual memory implementation such as paging and segmentation. Explain memory relocation of paging system.

"Objectives Memory Management"
    •   To provide a detailed description of various ways of
    •    organizing memory hardware.
    •   To discuss various memory-management techniques,
    •  including paging and segmentation.
    •  To provide a detailed description of the Intel Pentium, which supports both pure   segmentation and segmentation with paging.

    • Program must be brought (from disk) into memory and placed within a process for it to   be run.
    •  Main memory and registers are only storage CPU can access directly.
    •  Register access in one CPU clock (or less).
    •  Main memory can take many cycles.
    •  Cache sits between main memory and CPU registers.
    •   Protection of memory required to ensure correct operation.

"virtual memory implementation"

virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various hardware memory device (such as RAM modules and disk storage drives), allowing a program to be designed as though:
    • there is only one hardware memory device and this "virtual" device acts like a RAM module.
    • the program has, by default, sole access to this virtual RAM module as the basis        for a contiguous working memory.
-     When the kernel detects a page fault it will generally adjust the virtual memory range of the program which triggered it, granting it access to the memory requested. This gives the kernel discretionary power over where a particular application's memory is stored, or even whether or not it has actually been allocated yet.

"Segmentation"

    • Memory-management scheme that supports user view of memory.
    • A program is a collection of segments. A segment is a logical unitsuch as:
  • Main program,
  • Procedure,
  • Function,
  • Method,
  • Object,
  • Local variables, global variables,
  • Common block,
  • Stack,
  • symbol table, arrays

"PAGING"
    • Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available
    • Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8,192 bytes)
    • Divide logical memory into blocks of same size called pages
    • Keep track of all free frames
    • To run a program of size n pages, need to find n free frames and load program
    • Set up a page table to translate logical to physical addresses
    • Internal fragmentation


"Explain Memory Relocation of Paging System"

In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. The main advantage of paging is that it allows the physical address space of a process to be noncontiguous. Before the time paging was used, systems had to fit whole programs into storage contiguously, which caused various storage and fragmentation problems.

No comments:

Post a Comment