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
An operating system is a program that controls the execution of application
programs and acts as an interface between the user of a computer and the
computer hardware. An operating system has three objectives as listed
below:
Conveniency: An operating system makes a computer more
convenient to be used.
Efficiency: An operating system allows the computer system
resources to be used in an efficient manner
Ability to evolve: an operating system is constructed in such a way
as to permit the effective development, testing and introduction of
new system function without at the same time interfering with
service.
Meanwhile the functions of operating system are to:
Control the computer resources
Program implementation
Manage the data and information
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
Paging permits a program to be allocated noncontiguous blocks of memory. We divide programs into pages which are blocks of small, fixed size. We then divide the physical memory into frames which are blocks of size equal to page size. We use a page-table to map program pages to memory frames.
The page size (S) is defined by the hardware. Generally it ranges from 512 words/page to 4096 words/page.
The page size (S) is defined by the hardware. Generally it ranges from 512 words/page to 4096 words/page.
No comments:
Post a Comment