Beruflich Dokumente
Kultur Dokumente
Rennie Ramlochan
Fundamentals Of Operating System
1)
Logical memory is the address space, assigned to a logical partition, that the
operating system perceives as its main storage. For a logical partition that
uses shared memory a subset of the logical memory is backed up by physical
main storage and the remaining logical memory is kept in auxiliary storage.
Logical address is generated by the CPU; also referred to as virtual address
while Physical address is address seen by the memory unit.
Logical and physical addresses are the same in compile-time and load-time
address-binding schemes and logical (virtual) and physical addresses differ in
execution-time address-binding scheme.
Physical memory is the amount of memory that is derived from hardware.
This is typically the RAM modules that are installed onto the motherboard. It
refers to the actual memory bank made of RAM chips. The term is generally
used when discussing virtual memory to differentiate what is in RAM versus
what has been swapped temporarily to disk.
Virtual memory is derived from the operating system's use of the hard disk
to temporarily write and read information to simulate a larger memory
capacity. Simulating more random access memory (RAM) than actually
exists, allowing the computer to run larger programs and multiple programs
concurrently. A common function in most every OS and hardware platform,
virtual memory uses the hard disk to temporarily hold what was in real
memory.
Virtual memory allows multiple programs to load in memory at the same
time. Each application addresses memory starting at zero, but virtual
memory takes control of the memory addressing and lets each application
function as if it had unlimited memory.
Or
Virtual memory is a technique that allows processes that may not be entirely
in the memory to execute by means of automatic storage allocation upon
request. The term virtual memory refers to the abstraction of separating
LOGICAL memory--memory as seen by the process--from PHYSICAL memory-memory as seen by the processor. Because of this separation, the
programmer needs to be aware of only the logical memory space while the
operating system maintains two or more levels of physical memory space.
----------SEGMENT 4
----------SEGMENT 9
----------Using segmented memory management, the memory controller needs to know where in physical
memory is the start and the end of each segment. When segments are replaced, a single segment
can only be replaced by a segment of the same size, or by a smaller segment. After a time this
results in a "memory fragmentation'', with many small segments residing in memory, having
small gaps between them. Because the probability that two adjacent segments can be replaced
simultaneously is quite low, large segments may not get a chance to be placed in memory very
often. In systems with segmented memory management, segments are often ``pushed together''
occasionally to limit the amount of fragmentation and allow large segments to be loaded.
This organization appears to be efficient because an entire block of code is available to the
processor. Also, it is easy for two processes to share the same code in a segmented memory
system; if the same procedure is used by two processes concurrently, there need only be a single
copy of the code segment in memory. (Each process would maintain its own, distinct data
segment for the code to access, however.)
Segmented memory management is not as popular as paged memory management, however. In
fact, most processors which presently claim to support segmented memory management actually
support a hybrid of paged and segmented memory management, where the segments consist of
multiples of fixed size blocks.
1c)
The steps taken when a page is needed but it is located on disk.
5. Return control to the program, transparently retrying the instruction that caused the page
fault.
The need to reference memory at a particular address arises from two main sources:
In step 2, when a page has to be loaded and all existing pages in RAM are currently in use, one
of the existing pages must be swapped with the requested new page. The paging system must
determine the page to swap by choosing one that is least likely to be needed within a short time.
There are various page replacement algorithms that try to answer such issue. Most operating
systems use some approximation of the least recently used (LRU) page replacement algorithm
(the LRU itself cannot be implemented on the current hardware) or working set based algorithm.
References:
http://forums.techarena.in/motherboard-processor-ram/1161454.htm
http://stackoverflow.com/questions/1204018/memory-segmentation-onmodern-oses-why-do-you-need-4-segments
http://en.wikipedia.org/wiki/Memory_segmentation