Handptright operating system maintains information

Info icon This preview shows pages 16–26. Sign up to view the full content.

View Full Document Right Arrow Icon
handptright Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS process 5 process 8 process 2 OS process 5 process 2 OS process 5 process 2 OS process 5 process 9 process 2 process 9 process 10
Image of page 16

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.17 Operating System Concepts Dynamic Storage-Allocation Problem square6 First-fit : Allocate the first hole that is big enough. square6 Best-fit : Allocate the smallest hole that is big enough; must search entire list, unless ordered by size. Produces the smallest leftover hole. square6 Worst-fit : Allocate the largest hole; must also search entire list. Produces the largest leftover hole. How to satisfy a request of size n from a list of free holes. First-fit and best-fit better than worst-fit in terms of speed and storage utilization.
Image of page 17
Silberschatz, Galvin and Gagne 2002 9.18 Operating System Concepts Fragmentation square6 External Fragmentation – total memory space exists to satisfy a request, but it is not contiguous. square6 Internal Fragmentation – allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used. square6 Reduce external fragmentation by compaction handptright Shuffle memory contents to place all free memory together in one large block. handptright Compaction is possible only if relocation is dynamic, and is done at execution time. handptright I/O problem filetalltext3 Latch job in memory while it is involved in I/O. filetalltext3 Do I/O only into OS buffers.
Image of page 18

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.19 Operating System Concepts Paging square6 Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available. square6 Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes). square6 Divide logical memory into blocks of same size called pages . square6 Keep track of all free frames. square6 To run a program of size n pages, need to find n free frames and load program. square6 Set up a page table to translate logical to physical addresses. square6 Internal fragmentation.
Image of page 19
Silberschatz, Galvin and Gagne 2002 9.20 Operating System Concepts Address Translation Scheme square6 Address generated by CPU is divided into: handptright Page number (p) – used as an index into a page table which contains base address of each page in physical memory. handptright Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit.
Image of page 20

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.21 Operating System Concepts Address Translation Architecture
Image of page 21
Silberschatz, Galvin and Gagne 2002 9.22 Operating System Concepts Paging Example
Image of page 22

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.23 Operating System Concepts Paging Example
Image of page 23
Silberschatz, Galvin and Gagne 2002 9.24 Operating System Concepts Free Frames Before allocation After allocation
Image of page 24

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.25 Operating System Concepts Implementation of Page Table square6 Page table is kept in main memory.
Image of page 25
Image of page 26
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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