Typical virtual memory layout, Operating System

Using pages makes it easier to manage the whole memory, avoiding excessive fragmentation and waste. As an analogy, think of Tetris, but with only square blocks: it is relatively easy to avoid fragmentation in this case. Both the virtual and the physical memory are divided into pages. As an aside, we often refer to physical memory pages as frames. Every virtual page consists of a range of virtual addresses. Virtual pages are then mapped to physical pages in the physical memory. When an application needs to access a virtual page, the corresponding virtual address is translated into a "real" physical address, and then the actual data might be read and/or written. As a consequence, note that although arrays are contiguous in virtual memory, they may be non-contiguous in physical memory. Note also that some virtual pages do not map to any actual physical memory address, because not all virtual pages are necessarily being used at any given time. The unused virtual pages are called invalid. If a program ever tries to access an invalid page, it pagefaults.

A typical virtual memory layout includes a stack, a mmap region, a heap, and the code of the program (the "text" section). Since mmap and heap grow towards each other, in the worst case they could smash into each other. The same could happen with the stack: if a program recurses for a large number of times, the stack could grow over the mmap region ("stack over?ow") and in this case something bad and usually unpredictable will happen.

Posted Date: 3/12/2013 5:35:28 AM | Location : United States

Related Discussions:- Typical virtual memory layout, Assignment Help, Ask Question on Typical virtual memory layout, Get Answer, Expert's Help, Typical virtual memory layout Discussions

Write discussion on Typical virtual memory layout
Your posts are moderated
Related Questions
Explain the Resource Ownership and Control Operating systems are required to handle many different types of resources. CPU , memory, and I/O devicesĀ  are some of the varied sys

Describe the file system architecture. File System Architecture contains the subsequent components:- Device Driver 1 Device Driver 2 Device Driver 3 Basic fi

We can view an operating system as a resource allocator. Explain. We can outlook an operating system as a resource allocator. A computer system has Many resources (software and

Explain the Alphabet and String A finite set of symbols is known as alphabet. An alphabet is frequently denoted by sigma, yet can be given any name. B = {0, 1} says B is an

Explain about file allocation methods? The main problem in direct-access nature is how to assign space to these files so that disk space if utilized effectively and files can b

Question 3: (a) Fincorp Ltd is an insurance company wishing to change over to a better business system using an improved version of a financial information system (FIS). The direc

Characteristics of suspend process Suspended process isn't immediately available for execution. The process may or may not be waiting on an event. For preventing t

What is an operating system? An operating system is a program that manages the computer hardware. It acts as an intermediate among users of a computer and the computer hardware

Short term scheduling The short term scheduler as well known as the dispatcher executes most frequently and makes the fine grained decision of which process to execute next. Th

Question: a) The following refers to optimization under Windows XP: i) Give five steps which could undertake to enhance overall system performance in a default Windows XP in