YTread Logo
YTread Logo

Segmented, Paged and Virtual Memory

May 29, 2021
This diagram illustrates the essence of a

segmented

memory

management system On the left are some of the programs that have been installed on the computer's hard drive These are just files on the drive until they are started In the middle is the physical

memory

of the computer RAM this contains all the programs and data that are currently in use on the right is a swap file on the computer's hard drive each program that is currently running can be a procedure or a function a running instance of a program is called a process needless to say the operation The system itself has several processors in memory when the computer is running.
segmented paged and virtual memory
Suppose the user starts launching applications. Sooner or later the memory will be full. Notice how different processors take up different amounts of memory. These portions of memory are known as segments. Simply based on the sizes of the programs for each process, the operating system knows its initial location and its size, so it knows where everything is when a request is made to start more software, maybe a word processing application, something He has to get out of there. memory to make room for it, if one of the processors belonging to the presentation software is not currently doing anything, the operating system might decide to move it to disk temporarily, at least so that the word processing programs can start when another request is made, maybe to start a website.
segmented paged and virtual memory

More Interesting Facts About,

segmented paged and virtual memory...

This time, in the browser, another idle process of at least the same size must be moved out of memory to make room for the spreadsheet process in the swap file to start running again. Something else of at least the same size must be swapped, although there is enough free space to allow this the free space is fragmented in the

segmented

memory management system each process is atomic it cannot be divided it is all or nothing so the process of the spreadsheet will have to wait for the possibilities of the big presentation process. Returns to memory are now particularly low because a number of adjacent processes will have to go idle before this can happen.
segmented paged and virtual memory
In summary, in a segmented memory management system, segments are swapped between disks and main memory as needed. Program segments correspond to blocks of program code. as procedures or functions, data segments correspond to data structures such as spax queues or graphs, segments vary in size, the operating system knows the start and size of each segment in physical memory, each segment is atomic, whether that the entire segment is in RAM or none of the segment is in RAM a segment in memory can only be replaced by a segment of the same size or a smaller segmentation can result in memory fragmentation many small segments with Spaces between large segments may not be allowed to enter memory very often in all segments can be put together to limit the amount of fragmentation and allow large segments to be loaded more often with

paged

memory.
segmented paged and virtual memory
As far as any program is concerned, it has all the memory to itself, which of course is not true, but the operating system allows the program. behave as if this were the case the memory view of a program is called logical memory in reality each program is divided into two pages of equal size each page is only four kilobytes in size so a single page can contain a single program more than one program or just part of a program, these pages could be anywhere in physical memory where the operating system decides to place them, in fact some pages may be in secondary storage to make this possible, the operating system maintains a page table with information about which logical pages map locations to which physical locations, as far as any program is concerned, memory is a quiet place here is the text process view of memory if it is also running and this is what the spreadsheet application thinks is happening in physical memory reality.
Of course, something more complicated is that another program or even data wants to access the memory, it may be loaded in a fragmented state If there is not enough space, some of the other pages will be moved to disk. This is called paging when the program on disk is required again it will be

paged

again to supplement the RAM with secondary storage as this is called

virtual

memory on a busy system when the memory is almost full there can be so much activity paging the computer becomes unusable, slow, this is called disk threshing or disk beating in short with paged memory the memory is divided into small sections of equal size called pages or page frames a single application can occupy several pages that are not necessarily contiguous each application program has its own view of memory, this is called Logical memory: a page table records where the different pages of a program are located in physical memory.
Unused pages can be paged to a swap file on disk to make room for others, and these pages are re-paged when needed again to supplement the physical one. Memory with secondary storage is known as

virtual

memory when memory is low, excessive swapping can lead to disk destruction and this can degrade performance, so striping or paged memory is better. Segmented memory makes an entire block of code available to the processor, allowing for quick access segmentation. On the other hand, it can cause fragmentation of free space with segmented memory. Large processes may not access memory very frequently. Paged memory, on the other hand, can lead to fragmented processes that will run more slowly.
However, paged memory makes better use of free space. Windows uses paged memory. Segmented memory is not that common. Some processors support a hybrid of paged and segmented memory management in which each segment consists of several fixed-size blocks. The best of both worlds.

If you have any copyright issue, please Contact