week7_friday - CSCC 69H3 Operating Systems Spring 2010...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCC 69H3 Operating Systems Spring 2010 Professor Bianca Schroeder U of T
Background image of page 1

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

View Full Document Right Arrow Icon
Fixed Partitioning Divide memory into regions with fixed boundaries Can be equal-size or unequal-size A single process can be loaded into each remaining partition Example: 2 processes with 5M and 2M, respectively. Operating system 8M Available 8M Available 8M Process 1 - 5M Unusable - 3M Process 2 - 2M Unusable - 6M Disadvantages? Memory is wasted if process is smaller than partition ( internal fragmentation ) Programmer must deal with programs that are larger than partition ( overlays )
Background image of page 2
Dynamic Partitioning Partitions vary in length and number over time When a process is brought in to memory, a partition of exactly the right size is created to hold it Operating system 8M Available 32M Operating system 8M Available 27M Operating system 8M Available 20M Process 1 - 5M Process 1 - 5M Process 2 - 7M Disadvantages?
Background image of page 3

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

View Full Document Right Arrow Icon
Problems with Partitioning With fixed partitioning, internal fragmentation and need for overlays are big problems Scheme is too inflexible With dynamic partitioning, external fragmentation and management of space are major problems Basic problem is that processes must be allocated to contiguous blocks of physical memory Hard to figure out how to size these blocks given that processes are not all the same We’ll look now at paging as a solution
Background image of page 4
Paging Partition memory into equal, fixed-size chunks These are called page frames or simply frames Divide processes’ memory into chunks of the same size These are called pages Possible page frame sizes are restricted to powers of 2 to simplify translation
Background image of page 5

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

View Full Document Right Arrow Icon
Example of Paging We can fit Process D into memory, even though we don’t have 3 contiguous frames available! A.0 A.1 A.2 C.0 C.1 0 1 2 3 4 5 6 7 8 Main memory A.0 A.1 A.2 D.0 D.1 C.0 C.1 D.2 0 1 2 3 4 5 6 7 8 Main memory Suppose a new process, D, arrives needing 3 frames of memory
Background image of page 6
Example of Paging Is there fragmentation with paging? External fragmentation is eliminated Internal fragmentation is at most a part of one page per process A.0 A.1 A.2 C.0 C.1 0 1 2 3 4 5 6 7 8 Main memory A.0 A.1 A.2 D.0 D.1 C.0 C.1 D.2 0 1 2 3 4 5 6 7 8 Main memory Suppose a new process, D, arrives needing 3 frames of memory
Background image of page 7

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

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

{[ snackBarMessage ]}

Page1 / 24

week7_friday - CSCC 69H3 Operating Systems Spring 2010...

This preview shows document pages 1 - 8. Sign up to view the full document.

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