Only the base address of the workspace and the size need to be stored ie the

Only the base address of the workspace and the size

This preview shows page 56 - 58 out of 102 pages.

which is estimated to be large enough to meet its needs. Only the base address of the workspace and the size need to be stored i.e. the whole vector in logical memory is mapped into a corresponding vector in physical memory. We don't know where it lies in the physical memory, but the mapping is one-to-one. The disadvantage with this scheme is that either too much or too little memory might be allocated for the tasks. Moreover - if only a small part of the program is actually required in practice, then a large amount of memory is wasted and cannot be reused. 2. Coarse grain or ``quantize'' the memory in smallish pieces, called pages . Each page is chosen to have the same fixed size (generally 2-4kB on modern systems), given by some power of bits (this varies from system to system). The base address of each page is then stored in the conversion table (the length is known, since it is fixed). A unit of logical memory is called a page , whereas a unit of
Image of page 56
physical memory is called a frame . Apart from the difference in names, they must of course have the same size. The second of these possibilities is an attractive propostion for a number of reasons. By breaking up the memory into smaller pieces, we have the possibility of reorganizing (reusing) each piece separately. Large programs need not be entirely in memory if they are not needed. Also, if two programs use the same code, they can share pages, so two logical pages map into the same physical frame. This is advantageous for shared-libraries . Page numbers and addresses Page addressing is a simple matter if the size of one page is a power . Since addresses are stored in bits, page numbers can be assigned by simply throwing away the lower bits from every address. It is analogous to counting in blocks of a thousand, in regular base . To number blocks of size in base 10, one simply has to drop the lowest three digits. Thus to store the mapping from logical to physical here, we must cover all addresses from to . Without pages, this would require addresses. with paging we need only addresses, since and are both in page , for instance. An important consequence of the mapping of pages, is that what appears to the user as of sequential memory may in reality be spread in some random order just about anywhere in physical memory. The tables which map logical to physical memory are called the page table and the frame table , and are stored per process and loaded as a part of context switching. 5.1.7 Segmentation - sharing From the point of view of the system: sharing , process management and efficiency , it is highly convenient to view the memory for different processes as being segmented . A segment is a convenient block of logical memory which is assigned to a process when it is executed. The memory given to any process is divided up into one or more segments which then belong to that process. The purpose of segments is to help the system administrate the needs of all processes according to a simple paradigm. Each segment of memory is administrated separately and all of the checks on valid addressing are made on each segment. It is therefore convenient to use separate segments for logically separate parts of a program/process.
Image of page 57
Image of page 58

You've reached the end of your free preview.

Want to read all 102 pages?

  • One '20

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors