{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

S best fit allocate the smallest hole that is big

Info iconThis preview shows pages 17–26. Sign up to view the full content.

View Full Document Right Arrow Icon
s Best-fit : Allocate the smallest hole that is big enough; must search entire list, unless ordered by size. Produces the smallest leftover hole. s 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.
Background image of page 17

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.18 Operating System Concepts Fragmentation s External Fragmentation – total memory space exists to satisfy a request, but it is not contiguous. s Internal Fragmentation – allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used. s Reduce external fragmentation by compaction h Shuffle memory contents to place all free memory together in one large block. h Compaction is possible only if relocation is dynamic, and is done at execution time. h I/O problem f Latch job in memory while it is involved in I/O. f Do I/O only into OS buffers.
Background image of page 18
Silberschatz, Galvin and Gagne 2002 9.19 Operating System Concepts Paging s Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available. s Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes). s Divide logical memory into blocks of same size called pages . s Keep track of all free frames. s To run a program of size n pages, need to find n free frames and load program. s Set up a page table to translate logical to physical addresses. s Internal fragmentation.
Background image of page 19

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.20 Operating System Concepts Address Translation Scheme s Address generated by CPU is divided into: h Page number (p) – used as an index into a page table which contains base address of each page in physical memory. h Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit.
Background image of page 20
Silberschatz, Galvin and Gagne 2002 9.21 Operating System Concepts Address Translation Architecture
Background image of page 21

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.22 Operating System Concepts Paging Example
Background image of page 22
Silberschatz, Galvin and Gagne 2002 9.23 Operating System Concepts Paging Example
Background image of page 23

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne 2002 9.24 Operating System Concepts Free Frames Before allocation After allocation
Background image of page 24
Silberschatz, Galvin and Gagne 2002 9.25 Operating System Concepts Implementation of Page Table s Page table is kept in main memory. s Page-table base register ( PTBR) points to the page table. s Page-table length register (PRLR) indicates size of the page table. s
Background image of page 25

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

View Full Document Right Arrow Icon
Image of page 26
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page17 / 54

s Best fit Allocate the smallest hole that is big enough...

This preview shows document pages 17 - 26. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online