Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Memory Management Functions - Information Technology - Lecture Slides, Slides of Information Technology

This lecture is part of lecture series on Information Technology course. This lecture includes: Memory Management Function, First in First Out Buffer, Fifo, Modes of Data Transfer, Direct Memory Access, Dma Controller, Multiprogramming, Modeling Multiprogramming, Names and Binding, Address Binding, Dynamic Relocation with a Base, Protection Using Base & Limit Registers, Address Space, Various Methods Used by Os, Swapping, Virtual Memory, Paging, Inverted Page Tables, Stack Algorithms, Segmentati

Typology: Slides

2012/2013

Uploaded on 12/31/2013

mandhata
mandhata ๐Ÿ‡ฎ๐Ÿ‡ณ

4.5

(13)

68 documents

1 / 55

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
โ€œMemory Management
Functionโ€
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37

Partial preview of the text

Download Memory Management Functions - Information Technology - Lecture Slides and more Slides Information Technology in PDF only on Docsity!

โ€œMemory Management

Function

Contents ๏ƒ˜ Basic memory management ๏ƒ˜ Swapping ๏ƒ˜ Virtual memory ๏ƒ˜ Paging

Page replacement algorithmsModeling page replacement algorithmsDesign issues for paging systemsImplementation issues

๏ƒ˜^ Segmentation

Memory Management ๏‚ž^ Ideally programmers want memory that is^ ๏‚—^ large^ ๏‚—^ fast^ ๏‚—^ non volatile ๏‚ž^ Memory hierarchy^ ๏‚—^ small amount of fast, expensive memory โ€“ cache^ ๏‚—^ some medium-speed, medium price main memory^ ๏‚—^ gigabytes of slow, cheap disk storage ๏‚ž^ Memory manager handles the memory hierarchy

Multiprogramming with Fixed

Partitions ๏‚ž^ Fixed memory partitions^ ๏‚—^ separate input queues for each partition^ ๏‚—^ single input queue

Names and Binding

๏‚—^ Symbolic names

๏‚ฎ^ Logical names

๏‚ฎ^ Physical names

โ—‹^ Symbolic Names: known in a context or path^ ๏‚—^ file names, program names, printer/device names, user names โ—‹^ Logical Names: used to label a specific entity^ ๏‚—^ job number, major/minor device numbers, process id (pid), uid. โ—‹^ Physical Names: address of entity^ ๏‚—^ inode address on disk or memory^ ๏‚—^ entry point or variable address^ ๏‚—^ PCB address

Address Binding

๏‚ž^ Address binding^ ๏‚—^ fixing a physical address to the logical address of a processโ€™address space ๏‚ž^ Compile time binding^ ๏‚—^ if program location is fixed and known ahead of time ๏‚ž^ Load time binding^ ๏‚—^ if program location in memory is unknown until run-timeAND location is fixed ๏‚ž^ Execution time binding^ ๏‚—^ if processes can be moved in memory during execution^ ๏‚—^ Requires hardware support

Dynamic relocation with a base

register

๏‚ž^ Memory Management Unit (MMU) - dynamicallyconverts logical addresses into physical address ๏‚ž^ MMU contains base address register for running process

process

i Operatingsystem

Max addr^0

Max Mem

0 Physical memoryaddress

Relocation register for process

i^1000 +^ MMU Program generated address

Protection using base & limit

registers

๏‚ž^ Memory protection^ ๏‚—^ Base register gives starting address for process^ ๏‚—^ Limit register limits the offset accessible from therelocation register

base +

Physicaladdress^

memory register limitregister yes< no addressing^ error logicaladdress

Features of Memory Management^ ๏‚ž^ Relocation

  1. Static2. Dynamic ๏‚ž^ Protection ๏‚ž^ Sharing ๏‚ž^ Logical organization ๏‚ž^ Physical organization ๏‚ž^ Memory Compaction

Various Methods used by OS ๏‚ž Swapping ๏‚ž Virtual Memory ๏‚ž Paging ๏‚ž Segmentation

Swapping

๏‚ž^ Allocating space for growing data segment ๏‚ž^ Allocating space for growing stack & data segment

Memory Management with Bit Maps^ ๏‚ž

Part of memory with 5 processes, 3 holes^ ๏‚—^ tick marks show allocation units^ ๏‚—^ shaded regions are free ๏‚ž Corresponding bit map ๏‚ž Same information as a list

Managing memory with linked listsSearching the list for space for a new process^ ๏‚—^ First Fit^ ๏‚—^ Next Fit

โ—‹^ Start from current location in the list ๏‚— Best Fit โ—‹^ Find the smallest hole that will work โ—‹^ Tends to create lots of really small holes ๏‚— Worst Fit โ—‹^ Find the largest hole โ—‹^ Remainder will be big ๏‚— Quick Fit โ—‹^ Keep separate lists for common sizes

Virtual Memory

๏‚ž^ Virtual Memory^ โ—‹

Separation

of^ user

logical

memory

from

physical

memory. โ—‹ Only^ PART

of the program needs to be in memory for execution. โ—‹ Logical address space can be much larger than physicaladdress space. โ—‹ Need to allow pages to be swapped in and out. ๏‚ž^ Virtual Memory can be implemented via^ ๏‚—^ Paging^ ๏‚—^ Segmentation