Operating System - Memory Management Part 2 - Notes, Study notes of Operating Systems

In this document topics covered which are Fixed and Variable Partition , Fragmentation, Types of Fragmentation, Solution for Fragmentation, Free Frames, Paging Example .

Typology: Study notes

2010/2011

Uploaded on 09/01/2011

visir66
visir66 🇮🇳

4.4

(74)

97 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MEMORY MANAGEMENT
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Operating System - Memory Management Part 2 - Notes and more Study notes Operating Systems in PDF only on Docsity!

MEMORY MANAGEMENT

Fixed and Variable Partition

  • (^) Fixed Partition : Memory is divided into chunks. For example, 4K/8K/16K Bytes. All of these are same size.
  • (^) Allocation : If a certain chunk can hold the program/data, then the allocation. If a chunk can not hold program/data then multiple chunks are allocated to accommodate the program/data.

Fragmentation

  • (^) Fixed Size: Internal Fragmentation
  • (^) Variable Size: External Fragmentation

Types of Fragmentation

  • (^) External Fragmentation – total memory space exists to satisfy a request, but it is not in sequence.
  • (^) Internal Fragmentation – allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used

Solution for Fragmentation

  • (^) Internal Fragmentation may be solved by using fixed size paging approach.

Solution for Fragmentation

  • (^) External Fragmentation may be solved by using variable size segmentation approach.

Paging

  • (^) Divide logical memory into blocks of same size called pages.
  • (^) Keep track of all free frames
  • (^) To run a program of size n pages, need to find n free frames and load program
  • (^) Set up a page table to translate logical to physical addresses
  • (^) Internal fragmentation

Paging Example

Free Frames

Before allocation (^) After allocation

Segmentation

  • (^) Memory-management scheme that supports user view of memory
  • (^) A program is a collection of segments. A segment is a logical unit such as: main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, arrays

Logical View of Segmentation

1 3 2 4 1 4 2 3 user space physical memory space

Segmentation Architecture

(Cont.)

  • (^) Relocation.
    • (^) dynamic
    • (^) by segment table
  • (^) Sharing.
    • (^) shared segments
    • (^) same segment number
  • (^) Allocation.
    • (^) first fit/best fit
    • (^) external fragmentation