SlideShare a Scribd company logo
Operating System Concepts Silberschatz and Galvin19998.1Operating System Concepts Silberschatz and Galvin19995.1Operating System Concepts Silberschatz and Galvin 19994.1
1 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
O P E R A T I N G S Y S T E M S
Module 8 : Memory Management
• Background
• Logical versus Physical Address Space
• Swapping
• Contiguous Allocation
• Paging
• Segmentation
• Segmentation with Paging
Operating System Concepts Silberschatz and Galvin19998.2Operating System Concepts Silberschatz and Galvin19995.2Operating System Concepts Silberschatz and Galvin 19994.2
2 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Module 8: Memory Management
• Background
• Logical versus Physical Address Space
• Swapping
• Contiguous Allocation
• Paging
• Segmentation
• Segmentation with Paging
Operating System Concepts Silberschatz and Galvin19998.3Operating System Concepts Silberschatz and Galvin19995.3Operating System Concepts Silberschatz and Galvin 19994.3
3 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Background
• Program must be brought into memory and placed within a
process for it to be executed.
• Input queue – collection of processes on the disk that are waiting
to be brought into memory for execution.
• User programs go through several steps before being executed.
Operating System Concepts Silberschatz and Galvin19998.4Operating System Concepts Silberschatz and Galvin19995.4Operating System Concepts Silberschatz and Galvin 19994.4
4 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Binding of Instructions and Data to Memory
• Compile time: If memory location known a priori, absolute code
can be generated; must recompile code if starting location
changes.
• Load time: Must generate relocatable code if memory location is
not known at compile time.
• Execution time: Binding delayed until run time if the process
can be moved during its execution from one memory segment to
another. Need hardware support for address maps (e.g., base
and limit registers).
Address binding of instructions and data to memory addresses can
happen at three different stages.
Operating System Concepts Silberschatz and Galvin19998.5Operating System Concepts Silberschatz and Galvin19995.5Operating System Concepts Silberschatz and Galvin 19994.5
5 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Dynamic Loading
• Routine is not loaded until it is called
• Better memory-space utilization; unused routine is never loaded.
• Useful when large amounts of code are needed to handle
infrequently occurring cases.
• No special support from the operating system is required
implemented through program design.
Operating System Concepts Silberschatz and Galvin19998.6Operating System Concepts Silberschatz and Galvin19995.6Operating System Concepts Silberschatz and Galvin 19994.6
6 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Dynamic Linking
• Linking postponed until execution time.
• Small piece of code, stub, used to locate the appropriate memory-
resident library routine.
• Stub replaces itself with the address of the routine, and executes
the routine.
• Operating system needed to check if routine is in processes’
memory address.
Operating System Concepts Silberschatz and Galvin19998.7Operating System Concepts Silberschatz and Galvin19995.7Operating System Concepts Silberschatz and Galvin 19994.7
7 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Overlays
• Keep in memory only those instructions and data that are needed
at any given time.
• Needed when process is larger than amount of memory allocated
to it.
• Implemented by user, no special support needed from operating
system, programming design of overlay structure is complex
Operating System Concepts Silberschatz and Galvin19998.8Operating System Concepts Silberschatz and Galvin19995.8Operating System Concepts Silberschatz and Galvin 19994.8
8 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Logical vs. Physical Address Space
• The concept of a logical address space that is bound to a
separate physical address space is central to proper memory
management.
– Logical address – generated by the CPU; also referred to as
virtual address.
– Physical address – address seen by the memory unit.
• Logical and physical addresses are the same in compile-time and
load-time address-binding schemes; logical (virtual) and physical
addresses differ in execution-time address-binding scheme.
Operating System Concepts Silberschatz and Galvin19998.9Operating System Concepts Silberschatz and Galvin19995.9Operating System Concepts Silberschatz and Galvin 19994.9
9 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Memory-Management Unit (MMU)
• Hardware device that maps virtual to physical address.
• In MMU scheme, the value in the relocation register is added to
every address generated by a user process at the time it is sent to
memory.
• The user program deals with logical addresses; it never sees the
real physical addresses.
Operating System Concepts Silberschatz and Galvin19998.10Operating System Concepts Silberschatz and Galvin19995.10Operating System Concepts Silberschatz and Galvin 19994.10
10 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Swapping
• A process can be swapped temporarily out of memory to a backing
store, and then brought back into memory for continued execution.
• Backing store – fast disk large enough to accommodate copies of
all memory images for all users; must provide direct access to
these memory images.
• Roll out, roll in – swapping variant used for priority-based
scheduling algorithms; lower-priority process is swapped out so
higher-priority process can be loaded and executed.
• Major part of swap time is transfer time; total transfer time is
directly proportional to the amount of memory swapped.
• Modified versions of swapping are found on many systems, i.e.,
UNIX and Microsoft Windows.
Operating System Concepts Silberschatz and Galvin19998.11Operating System Concepts Silberschatz and Galvin19995.11Operating System Concepts Silberschatz and Galvin 19994.11
11 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Schematic View of Swapping
Operating System Concepts Silberschatz and Galvin19998.12Operating System Concepts Silberschatz and Galvin19995.12Operating System Concepts Silberschatz and Galvin 19994.12
12 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Contiguous Allocation
• Main memory usually into two partitions:
– Resident operating system, usually held in low memory with
interrupt vector.
– User processes then held in high memory.
• Single-partition allocation
– Relocation-register scheme used to protect user processes
from each other, and from changing operating-system code
and data.
– Relocation register contains value of smallest physical
address; limit register contains range of logical addresses –
each logical address must be less than the limit register.
Operating System Concepts Silberschatz and Galvin19998.13Operating System Concepts Silberschatz and Galvin19995.13Operating System Concepts Silberschatz and Galvin 19994.13
13 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Contiguous Allocation (Cont.)
• Multiple-partition allocation
– Hole – block of available memory; holes of various size are
scattered throughout memory.
– When a process arrives, it is allocated memory from a hole
large enough to accommodate it.
– 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
Operating System Concepts Silberschatz and Galvin19998.14Operating System Concepts Silberschatz and Galvin19995.14Operating System Concepts Silberschatz and Galvin 19994.14
14 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Dynamic Storage-Allocation Problem
• First-fit: Allocate the first hole that is big enough.
• Best-fit: Allocate the smallest hole that is big enough; must
search entire list, unless ordered by size. Produces the smallest
leftover hole.
• Worst-fit: Allocate the largest hole; must also search entier 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.
Operating System Concepts Silberschatz and Galvin19998.15Operating System Concepts Silberschatz and Galvin19995.15Operating System Concepts Silberschatz and Galvin 19994.15
15 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Fragmentation
• External fragmentation – total memory space exists to satisfy a
request, but it is not contiguous.
• Internal fragmentation – allocated memory may be slightly larger
than requested memory; this size difference is memory internal to a
partition, but not being used.
• Reduce external fragmentation by compaction
– Shuffle memory contents to place all free memory together in
one large block.
– Compaction is possible only if relocation is dynamic, and is
done at execution time.
– I/O problem
 Latch job in memory while it is involved in I/O.
 Do I/O only into OS buffers.
Operating System Concepts Silberschatz and Galvin19998.16Operating System Concepts Silberschatz and Galvin19995.16Operating System Concepts Silberschatz and Galvin 19994.16
16 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Paging
• Logical address space of a process can be noncontiguous;
process is allocated physical memory whenever the latter is
available.
• Divide physical memory into fixed-sized blocks called frames (size
is power of 2, between 512 bytes and 8192 bytes).
• 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.
Operating System Concepts Silberschatz and Galvin19998.17Operating System Concepts Silberschatz and Galvin19995.17Operating System Concepts Silberschatz and Galvin 19994.17
17 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Address Translation Scheme
• Address generated by CPU is divided into:
– Page number (p) – used as an index into a page table which
contains base address of each page in physical memory.
– Page offset (d) – combined with base address to define the
physical memory address that is sent to the memory unit.
Operating System Concepts Silberschatz and Galvin19998.18Operating System Concepts Silberschatz and Galvin19995.18Operating System Concepts Silberschatz and Galvin 19994.18
18 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Address Translation Architecture
Operating System Concepts Silberschatz and Galvin19998.19Operating System Concepts Silberschatz and Galvin19995.19Operating System Concepts Silberschatz and Galvin 19994.19
19 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Paging Example
Operating System Concepts Silberschatz and Galvin19998.20Operating System Concepts Silberschatz and Galvin19995.20Operating System Concepts Silberschatz and Galvin 19994.20
20 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Implementation of Page Table
• Page table is kept in main memory.
• Page-table base register (PTBR) points to the page table.
• Page-table length register (PRLR) indicates size of the page table.
• In this scheme every data/instruction access requires two memory
accesses. One for the page table and one for the data/instruction.
• The two memory access problem can be solved by the use of a
special fast-lookup hardware cache called associative registers or
translation look-aside buffers (TLBs)
Operating System Concepts Silberschatz and Galvin19998.21Operating System Concepts Silberschatz and Galvin19995.21Operating System Concepts Silberschatz and Galvin 19994.21
21 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Associative Register
• Associative registers – parallel search
Address translation (A´, A´´)
– If A´ is in associative register, get frame # out.
– Otherwise get frame # from page table in memory
Page # Frame #
Operating System Concepts Silberschatz and Galvin19998.22Operating System Concepts Silberschatz and Galvin19995.22Operating System Concepts Silberschatz and Galvin 19994.22
22 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Effective Access Time
• Associative Lookup =  time unit
• Assume memory cycle time is 1 microsecond
• Hit ration – percentage of times that a page number is found in
the associative registers; ration related to number of associative
registers.
• Hit ratio = 
• Effective Access Time (EAT)
EAT = (1 + )  + (2 + )(1 – )
= 2 +  – 
Operating System Concepts Silberschatz and Galvin19998.23Operating System Concepts Silberschatz and Galvin19995.23Operating System Concepts Silberschatz and Galvin 19994.23
23 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Memory Protection
• Memory protection implemented by associating protection bit with
each frame.
• Valid-invalid bit attached to each entry in the page table:
– “valid” indicates that the associated page is in the process’
logical address space, and is thus a legal page.
– “invalid” indicates that the page is not in the process’ logical
address space.
Operating System Concepts Silberschatz and Galvin19998.24Operating System Concepts Silberschatz and Galvin19995.24Operating System Concepts Silberschatz and Galvin 19994.24
24 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Two-Level Page-Table Scheme
Operating System Concepts Silberschatz and Galvin19998.25Operating System Concepts Silberschatz and Galvin19995.25Operating System Concepts Silberschatz and Galvin 19994.25
25 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Two-Level Paging Example
• A logical address (on 32-bit machine with 4K page size) is divided into:
– a page number consisting of 20 bits.
– a page offset consisting of 12 bits.
• Since the page table is paged, the page number is further divided into:
– a 10-bit page number.
– a 10-bit page offset.
• Thus, a logical address is as follows:
where pi is an index into the outer page table, and p2 is the displacement
within the page of the outer page table.
page number page offset
pi p2 d
10 10 12
Operating System Concepts Silberschatz and Galvin19998.26Operating System Concepts Silberschatz and Galvin19995.26Operating System Concepts Silberschatz and Galvin 19994.26
26 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Address-Translation Scheme
• Address-translation scheme for a two-level 32-bit paging
architecture
Operating System Concepts Silberschatz and Galvin19998.27Operating System Concepts Silberschatz and Galvin19995.27Operating System Concepts Silberschatz and Galvin 19994.27
27 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Multilevel Paging and Performance
• Since each level is stored as a separate table in memory,
covering a logical address to a physical one may take four
memory accesses.
• Even though time needed for one memory access is quintupled,
caching permits performance to remain reasonable.
• Cache hit rate of 98 percent yields:
effective access time = 0.98 x 120 + 0.02 x 520
= 128 nanoseconds.
which is only a 28 percent slowdown in memory access time.
Operating System Concepts Silberschatz and Galvin19998.28Operating System Concepts Silberschatz and Galvin19995.28Operating System Concepts Silberschatz and Galvin 19994.28
28 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Inverted Page Table
• One entry for each real page of memory.
• Entry consists of the virtual address of the page stored in that real
memory location, with information about the process that owns
that page.
• Decreases memory needed to store each page table, but
increases time needed to search the table when a page reference
occurs.
• Use hash table to limit the search to one — or at most a few —
page-table entries.
Operating System Concepts Silberschatz and Galvin19998.29Operating System Concepts Silberschatz and Galvin19995.29Operating System Concepts Silberschatz and Galvin 19994.29
29 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Inverted Page Table Architecture
Operating System Concepts Silberschatz and Galvin19998.30Operating System Concepts Silberschatz and Galvin19995.30Operating System Concepts Silberschatz and Galvin 19994.30
30 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Shared Pages
• Shared code
– One copy of read-only (reentrant) code shared among
processes (i.e., text editors, compilers, window systems).
– Shared code must appear in same location in the logical
address space of all processes.
• Private code and data
– Each process keeps a separate copy of the code and data.
– The pages for the private code and data can appear
anywhere in the logical address space.
Operating System Concepts Silberschatz and Galvin19998.31Operating System Concepts Silberschatz and Galvin19995.31Operating System Concepts Silberschatz and Galvin 19994.31
31 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Shared Pages Example
Operating System Concepts Silberschatz and Galvin19998.32Operating System Concepts Silberschatz and Galvin19995.32Operating System Concepts Silberschatz and Galvin 19994.32
32 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
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,
local variables, global variables,
common block,
stack,
symbol table, arrays
Operating System Concepts Silberschatz and Galvin19998.33Operating System Concepts Silberschatz and Galvin19995.33Operating System Concepts Silberschatz and Galvin 19994.33
33 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Logical View of Segmentation
1
3
2
4
1
4
2
3
user space physical memory space
Operating System Concepts Silberschatz and Galvin19998.34Operating System Concepts Silberschatz and Galvin19995.34Operating System Concepts Silberschatz and Galvin 19994.34
34 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Segmentation Architecture
• Logical address consists of a two tuple:
<segment-number, offset>,
• Segment table – maps two-dimensional physical addresses; each
table entry has:
– base – contains the starting physical address where the
segments reside in memory.
– limit – specifies the length of the segment.
• Segment-table base register (STBR) points to the segment table’s
location in memory.
• Segment-table length register (STLR) indicates number of segments
used by a program;
segment number s is legal if s < STLR.
Operating System Concepts Silberschatz and Galvin19998.35Operating System Concepts Silberschatz and Galvin19995.35Operating System Concepts Silberschatz and Galvin 19994.35
35 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Segmentation Architecture (Cont.)
• Relocation.
– dynamic
– by segment table
• Sharing.
– shared segments
– same segment number
• Allocation.
– first fit/best fit
– external fragmentation
Operating System Concepts Silberschatz and Galvin19998.36Operating System Concepts Silberschatz and Galvin19995.36Operating System Concepts Silberschatz and Galvin 19994.36
36 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Segmentation Architecture (Cont.)
• Protection. With each entry in segment table associate:
– validation bit = 0  illegal segment
– read/write/execute privileges
• Protection bits associated with segments; code sharing occurs at
segment level.
• Since segments vary in length, memory allocation is a dynamic
storage-allocation problem.
• A segmentation example is shown in the following diagram
Operating System Concepts Silberschatz and Galvin19998.37Operating System Concepts Silberschatz and Galvin19995.37Operating System Concepts Silberschatz and Galvin 19994.37
37 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Sharing of segments
Operating System Concepts Silberschatz and Galvin19998.38Operating System Concepts Silberschatz and Galvin19995.38Operating System Concepts Silberschatz and Galvin 19994.38
38 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Segmentation with Paging – MULTICS
• The MULTICS system solved problems of external fragmentation
and lengthy search times by paging the segments.
• Solution differs from pure segmentation in that the segment-table
entry contains not the base address of the segment, but rather the
base address of a page table for this segment.
Operating System Concepts Silberschatz and Galvin19998.39Operating System Concepts Silberschatz and Galvin19995.39Operating System Concepts Silberschatz and Galvin 19994.39
39 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
MULTICS Address Translation Scheme
Operating System Concepts Silberschatz and Galvin19998.40Operating System Concepts Silberschatz and Galvin19995.40Operating System Concepts Silberschatz and Galvin 19994.40
40 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Segmentation with Paging – Intel 386
• As shown in the following diagram, the Intel 386 uses
segmentation with paging for memory management with a two-
level paging scheme.
Operating System Concepts Silberschatz and Galvin19998.41Operating System Concepts Silberschatz and Galvin19995.41Operating System Concepts Silberschatz and Galvin 19994.41
41 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Intel 30386 address translation
Operating System Concepts Silberschatz and Galvin19998.42Operating System Concepts Silberschatz and Galvin19995.42Operating System Concepts Silberschatz and Galvin 19994.42
42 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42
Comparing Memory-Management Strategies
• Hardware support
• Performance
• Fragmentation
• Relocation
• Swapping
• Sharing
• Protection

More Related Content

What's hot

Run time storage
Run time storageRun time storage
Run time storage
Rasineni Madhan Mohan Naidu
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
Wayne Jones Jnr
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and Synchronization
Anas Ebrahim
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
Akmal Cikmat
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
Wayne Jones Jnr
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
Amir Payberah
 
File system structure
File system structureFile system structure
File system structure
sangrampatil81
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
Kathirvel Ayyaswamy
 
program partitioning and scheduling IN Advanced Computer Architecture
program partitioning and scheduling  IN Advanced Computer Architectureprogram partitioning and scheduling  IN Advanced Computer Architecture
program partitioning and scheduling IN Advanced Computer Architecture
Pankaj Kumar Jain
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
Mukesh Chinta
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
Wayne Jones Jnr
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
parallel language and compiler
parallel language and compilerparallel language and compiler
parallel language and compiler
Vignesh Tamil
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
V.V.Vanniaperumal College for Women
 
Parallel processing and pipelining
Parallel processing and pipeliningParallel processing and pipelining
Parallel processing and pipelining
mahesh kumar prajapat
 

What's hot (20)

1.prallelism
1.prallelism1.prallelism
1.prallelism
 
Run time storage
Run time storageRun time storage
Run time storage
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and Synchronization
 
Memory management
Memory managementMemory management
Memory management
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
File system structure
File system structureFile system structure
File system structure
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
 
program partitioning and scheduling IN Advanced Computer Architecture
program partitioning and scheduling  IN Advanced Computer Architectureprogram partitioning and scheduling  IN Advanced Computer Architecture
program partitioning and scheduling IN Advanced Computer Architecture
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
parallel language and compiler
parallel language and compilerparallel language and compiler
parallel language and compiler
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
 
Parallel processing and pipelining
Parallel processing and pipeliningParallel processing and pipelining
Parallel processing and pipelining
 

Similar to Operating System-Ch8 memory management

Materi8mainmemory
Materi8mainmemoryMateri8mainmemory
Ch8 main memory
Ch8 main memoryCh8 main memory
Ch8 main memory
Syaiful Ahdan
 
Operating System : Ch13 secondary storage
Operating System : Ch13 secondary storageOperating System : Ch13 secondary storage
Operating System : Ch13 secondary storage
Syaiful Ahdan
 
Ch10.1 secondary storage
Ch10.1 secondary storageCh10.1 secondary storage
Ch10.1 secondary storage
Syaiful Ahdan
 
Operating System : Ch14.tertiary storage structure
Operating System : Ch14.tertiary storage structureOperating System : Ch14.tertiary storage structure
Operating System : Ch14.tertiary storage structure
Syaiful Ahdan
 
Operating System : Ch12 io systems
Operating System : Ch12 io systemsOperating System : Ch12 io systems
Operating System : Ch12 io systems
Syaiful Ahdan
 
Ch12 file system implementation
Ch12 file system implementationCh12 file system implementation
Ch12 file system implementation
Syaiful Ahdan
 
Operating System : Ch11 file system implementation
Operating System : Ch11 file system implementationOperating System : Ch11 file system implementation
Operating System : Ch11 file system implementation
Syaiful Ahdan
 
Ch7 deadlocks
Ch7 deadlocksCh7 deadlocks
Ch7 deadlocks
Syaiful Ahdan
 
Operating System-Ch7 deadlocks
Operating System-Ch7 deadlocksOperating System-Ch7 deadlocks
Operating System-Ch7 deadlocks
Syaiful Ahdan
 
Ch13 io systems
Ch13 io systemsCh13 io systems
Ch13 io systems
Syaiful Ahdan
 
Operating System : Ch16.distributed system structures
Operating System : Ch16.distributed system structuresOperating System : Ch16.distributed system structures
Operating System : Ch16.distributed system structures
Syaiful Ahdan
 
Operating System : Ch17 distributed file systems
Operating System : Ch17 distributed file systemsOperating System : Ch17 distributed file systems
Operating System : Ch17 distributed file systems
Syaiful Ahdan
 
Operating System : Ch9 virtual memory
Operating System : Ch9 virtual memoryOperating System : Ch9 virtual memory
Operating System : Ch9 virtual memory
Syaiful Ahdan
 
Operating System-Ch4.processes
Operating System-Ch4.processesOperating System-Ch4.processes
Operating System-Ch4.processes
Syaiful Ahdan
 
Ch3.processes
Ch3.processesCh3.processes
Ch3.processes
Syaiful Ahdan
 
Ch9 virtual memory
Ch9 virtual memoryCh9 virtual memory
Ch9 virtual memory
Syaiful Ahdan
 
Ch10.2.tertiary storage structure
Ch10.2.tertiary storage structureCh10.2.tertiary storage structure
Ch10.2.tertiary storage structure
Syaiful Ahdan
 
Operating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordinationOperating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordination
Syaiful Ahdan
 
Ch11 file system interface
Ch11 file system interfaceCh11 file system interface
Ch11 file system interface
Syaiful Ahdan
 

Similar to Operating System-Ch8 memory management (20)

Materi8mainmemory
Materi8mainmemoryMateri8mainmemory
Materi8mainmemory
 
Ch8 main memory
Ch8 main memoryCh8 main memory
Ch8 main memory
 
Operating System : Ch13 secondary storage
Operating System : Ch13 secondary storageOperating System : Ch13 secondary storage
Operating System : Ch13 secondary storage
 
Ch10.1 secondary storage
Ch10.1 secondary storageCh10.1 secondary storage
Ch10.1 secondary storage
 
Operating System : Ch14.tertiary storage structure
Operating System : Ch14.tertiary storage structureOperating System : Ch14.tertiary storage structure
Operating System : Ch14.tertiary storage structure
 
Operating System : Ch12 io systems
Operating System : Ch12 io systemsOperating System : Ch12 io systems
Operating System : Ch12 io systems
 
Ch12 file system implementation
Ch12 file system implementationCh12 file system implementation
Ch12 file system implementation
 
Operating System : Ch11 file system implementation
Operating System : Ch11 file system implementationOperating System : Ch11 file system implementation
Operating System : Ch11 file system implementation
 
Ch7 deadlocks
Ch7 deadlocksCh7 deadlocks
Ch7 deadlocks
 
Operating System-Ch7 deadlocks
Operating System-Ch7 deadlocksOperating System-Ch7 deadlocks
Operating System-Ch7 deadlocks
 
Ch13 io systems
Ch13 io systemsCh13 io systems
Ch13 io systems
 
Operating System : Ch16.distributed system structures
Operating System : Ch16.distributed system structuresOperating System : Ch16.distributed system structures
Operating System : Ch16.distributed system structures
 
Operating System : Ch17 distributed file systems
Operating System : Ch17 distributed file systemsOperating System : Ch17 distributed file systems
Operating System : Ch17 distributed file systems
 
Operating System : Ch9 virtual memory
Operating System : Ch9 virtual memoryOperating System : Ch9 virtual memory
Operating System : Ch9 virtual memory
 
Operating System-Ch4.processes
Operating System-Ch4.processesOperating System-Ch4.processes
Operating System-Ch4.processes
 
Ch3.processes
Ch3.processesCh3.processes
Ch3.processes
 
Ch9 virtual memory
Ch9 virtual memoryCh9 virtual memory
Ch9 virtual memory
 
Ch10.2.tertiary storage structure
Ch10.2.tertiary storage structureCh10.2.tertiary storage structure
Ch10.2.tertiary storage structure
 
Operating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordinationOperating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordination
 
Ch11 file system interface
Ch11 file system interfaceCh11 file system interface
Ch11 file system interface
 

More from Syaiful Ahdan

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391
Syaiful Ahdan
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
Syaiful Ahdan
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774
Syaiful Ahdan
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775
Syaiful Ahdan
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078
Syaiful Ahdan
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723
Syaiful Ahdan
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523
Syaiful Ahdan
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309
Syaiful Ahdan
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149
Syaiful Ahdan
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868
Syaiful Ahdan
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343
Syaiful Ahdan
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755
Syaiful Ahdan
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196
Syaiful Ahdan
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484
Syaiful Ahdan
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352
Syaiful Ahdan
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994
Syaiful Ahdan
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895
Syaiful Ahdan
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administrator
Syaiful Ahdan
 
Pertemuan 5
Pertemuan 5Pertemuan 5
Pertemuan 5
Syaiful Ahdan
 
Pertemuan 4
Pertemuan 4Pertemuan 4
Pertemuan 4
Syaiful Ahdan
 

More from Syaiful Ahdan (20)

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administrator
 
Pertemuan 5
Pertemuan 5Pertemuan 5
Pertemuan 5
 
Pertemuan 4
Pertemuan 4Pertemuan 4
Pertemuan 4
 

Recently uploaded

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 

Recently uploaded (20)

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 

Operating System-Ch8 memory management

  • 1. Operating System Concepts Silberschatz and Galvin19998.1Operating System Concepts Silberschatz and Galvin19995.1Operating System Concepts Silberschatz and Galvin 19994.1 1 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 O P E R A T I N G S Y S T E M S Module 8 : Memory Management • Background • Logical versus Physical Address Space • Swapping • Contiguous Allocation • Paging • Segmentation • Segmentation with Paging
  • 2. Operating System Concepts Silberschatz and Galvin19998.2Operating System Concepts Silberschatz and Galvin19995.2Operating System Concepts Silberschatz and Galvin 19994.2 2 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Module 8: Memory Management • Background • Logical versus Physical Address Space • Swapping • Contiguous Allocation • Paging • Segmentation • Segmentation with Paging
  • 3. Operating System Concepts Silberschatz and Galvin19998.3Operating System Concepts Silberschatz and Galvin19995.3Operating System Concepts Silberschatz and Galvin 19994.3 3 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Background • Program must be brought into memory and placed within a process for it to be executed. • Input queue – collection of processes on the disk that are waiting to be brought into memory for execution. • User programs go through several steps before being executed.
  • 4. Operating System Concepts Silberschatz and Galvin19998.4Operating System Concepts Silberschatz and Galvin19995.4Operating System Concepts Silberschatz and Galvin 19994.4 4 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Binding of Instructions and Data to Memory • Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes. • Load time: Must generate relocatable code if memory location is not known at compile time. • Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g., base and limit registers). Address binding of instructions and data to memory addresses can happen at three different stages.
  • 5. Operating System Concepts Silberschatz and Galvin19998.5Operating System Concepts Silberschatz and Galvin19995.5Operating System Concepts Silberschatz and Galvin 19994.5 5 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Dynamic Loading • Routine is not loaded until it is called • Better memory-space utilization; unused routine is never loaded. • Useful when large amounts of code are needed to handle infrequently occurring cases. • No special support from the operating system is required implemented through program design.
  • 6. Operating System Concepts Silberschatz and Galvin19998.6Operating System Concepts Silberschatz and Galvin19995.6Operating System Concepts Silberschatz and Galvin 19994.6 6 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Dynamic Linking • Linking postponed until execution time. • Small piece of code, stub, used to locate the appropriate memory- resident library routine. • Stub replaces itself with the address of the routine, and executes the routine. • Operating system needed to check if routine is in processes’ memory address.
  • 7. Operating System Concepts Silberschatz and Galvin19998.7Operating System Concepts Silberschatz and Galvin19995.7Operating System Concepts Silberschatz and Galvin 19994.7 7 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Overlays • Keep in memory only those instructions and data that are needed at any given time. • Needed when process is larger than amount of memory allocated to it. • Implemented by user, no special support needed from operating system, programming design of overlay structure is complex
  • 8. Operating System Concepts Silberschatz and Galvin19998.8Operating System Concepts Silberschatz and Galvin19995.8Operating System Concepts Silberschatz and Galvin 19994.8 8 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Logical vs. Physical Address Space • The concept of a logical address space that is bound to a separate physical address space is central to proper memory management. – Logical address – generated by the CPU; also referred to as virtual address. – Physical address – address seen by the memory unit. • Logical and physical addresses are the same in compile-time and load-time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme.
  • 9. Operating System Concepts Silberschatz and Galvin19998.9Operating System Concepts Silberschatz and Galvin19995.9Operating System Concepts Silberschatz and Galvin 19994.9 9 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Memory-Management Unit (MMU) • Hardware device that maps virtual to physical address. • In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory. • The user program deals with logical addresses; it never sees the real physical addresses.
  • 10. Operating System Concepts Silberschatz and Galvin19998.10Operating System Concepts Silberschatz and Galvin19995.10Operating System Concepts Silberschatz and Galvin 19994.10 10 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Swapping • A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution. • Backing store – fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images. • Roll out, roll in – swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed. • Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped. • Modified versions of swapping are found on many systems, i.e., UNIX and Microsoft Windows.
  • 11. Operating System Concepts Silberschatz and Galvin19998.11Operating System Concepts Silberschatz and Galvin19995.11Operating System Concepts Silberschatz and Galvin 19994.11 11 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Schematic View of Swapping
  • 12. Operating System Concepts Silberschatz and Galvin19998.12Operating System Concepts Silberschatz and Galvin19995.12Operating System Concepts Silberschatz and Galvin 19994.12 12 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Contiguous Allocation • Main memory usually into two partitions: – Resident operating system, usually held in low memory with interrupt vector. – User processes then held in high memory. • Single-partition allocation – Relocation-register scheme used to protect user processes from each other, and from changing operating-system code and data. – Relocation register contains value of smallest physical address; limit register contains range of logical addresses – each logical address must be less than the limit register.
  • 13. Operating System Concepts Silberschatz and Galvin19998.13Operating System Concepts Silberschatz and Galvin19995.13Operating System Concepts Silberschatz and Galvin 19994.13 13 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Contiguous Allocation (Cont.) • Multiple-partition allocation – Hole – block of available memory; holes of various size are scattered throughout memory. – When a process arrives, it is allocated memory from a hole large enough to accommodate it. – 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
  • 14. Operating System Concepts Silberschatz and Galvin19998.14Operating System Concepts Silberschatz and Galvin19995.14Operating System Concepts Silberschatz and Galvin 19994.14 14 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Dynamic Storage-Allocation Problem • First-fit: Allocate the first hole that is big enough. • Best-fit: Allocate the smallest hole that is big enough; must search entire list, unless ordered by size. Produces the smallest leftover hole. • Worst-fit: Allocate the largest hole; must also search entier 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.
  • 15. Operating System Concepts Silberschatz and Galvin19998.15Operating System Concepts Silberschatz and Galvin19995.15Operating System Concepts Silberschatz and Galvin 19994.15 15 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Fragmentation • External fragmentation – total memory space exists to satisfy a request, but it is not contiguous. • Internal fragmentation – allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used. • Reduce external fragmentation by compaction – Shuffle memory contents to place all free memory together in one large block. – Compaction is possible only if relocation is dynamic, and is done at execution time. – I/O problem  Latch job in memory while it is involved in I/O.  Do I/O only into OS buffers.
  • 16. Operating System Concepts Silberschatz and Galvin19998.16Operating System Concepts Silberschatz and Galvin19995.16Operating System Concepts Silberschatz and Galvin 19994.16 16 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Paging • Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available. • Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes). • 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.
  • 17. Operating System Concepts Silberschatz and Galvin19998.17Operating System Concepts Silberschatz and Galvin19995.17Operating System Concepts Silberschatz and Galvin 19994.17 17 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Address Translation Scheme • Address generated by CPU is divided into: – Page number (p) – used as an index into a page table which contains base address of each page in physical memory. – Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit.
  • 18. Operating System Concepts Silberschatz and Galvin19998.18Operating System Concepts Silberschatz and Galvin19995.18Operating System Concepts Silberschatz and Galvin 19994.18 18 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Address Translation Architecture
  • 19. Operating System Concepts Silberschatz and Galvin19998.19Operating System Concepts Silberschatz and Galvin19995.19Operating System Concepts Silberschatz and Galvin 19994.19 19 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Paging Example
  • 20. Operating System Concepts Silberschatz and Galvin19998.20Operating System Concepts Silberschatz and Galvin19995.20Operating System Concepts Silberschatz and Galvin 19994.20 20 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Implementation of Page Table • Page table is kept in main memory. • Page-table base register (PTBR) points to the page table. • Page-table length register (PRLR) indicates size of the page table. • In this scheme every data/instruction access requires two memory accesses. One for the page table and one for the data/instruction. • The two memory access problem can be solved by the use of a special fast-lookup hardware cache called associative registers or translation look-aside buffers (TLBs)
  • 21. Operating System Concepts Silberschatz and Galvin19998.21Operating System Concepts Silberschatz and Galvin19995.21Operating System Concepts Silberschatz and Galvin 19994.21 21 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Associative Register • Associative registers – parallel search Address translation (A´, A´´) – If A´ is in associative register, get frame # out. – Otherwise get frame # from page table in memory Page # Frame #
  • 22. Operating System Concepts Silberschatz and Galvin19998.22Operating System Concepts Silberschatz and Galvin19995.22Operating System Concepts Silberschatz and Galvin 19994.22 22 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Effective Access Time • Associative Lookup =  time unit • Assume memory cycle time is 1 microsecond • Hit ration – percentage of times that a page number is found in the associative registers; ration related to number of associative registers. • Hit ratio =  • Effective Access Time (EAT) EAT = (1 + )  + (2 + )(1 – ) = 2 +  – 
  • 23. Operating System Concepts Silberschatz and Galvin19998.23Operating System Concepts Silberschatz and Galvin19995.23Operating System Concepts Silberschatz and Galvin 19994.23 23 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Memory Protection • Memory protection implemented by associating protection bit with each frame. • Valid-invalid bit attached to each entry in the page table: – “valid” indicates that the associated page is in the process’ logical address space, and is thus a legal page. – “invalid” indicates that the page is not in the process’ logical address space.
  • 24. Operating System Concepts Silberschatz and Galvin19998.24Operating System Concepts Silberschatz and Galvin19995.24Operating System Concepts Silberschatz and Galvin 19994.24 24 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Two-Level Page-Table Scheme
  • 25. Operating System Concepts Silberschatz and Galvin19998.25Operating System Concepts Silberschatz and Galvin19995.25Operating System Concepts Silberschatz and Galvin 19994.25 25 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Two-Level Paging Example • A logical address (on 32-bit machine with 4K page size) is divided into: – a page number consisting of 20 bits. – a page offset consisting of 12 bits. • Since the page table is paged, the page number is further divided into: – a 10-bit page number. – a 10-bit page offset. • Thus, a logical address is as follows: where pi is an index into the outer page table, and p2 is the displacement within the page of the outer page table. page number page offset pi p2 d 10 10 12
  • 26. Operating System Concepts Silberschatz and Galvin19998.26Operating System Concepts Silberschatz and Galvin19995.26Operating System Concepts Silberschatz and Galvin 19994.26 26 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Address-Translation Scheme • Address-translation scheme for a two-level 32-bit paging architecture
  • 27. Operating System Concepts Silberschatz and Galvin19998.27Operating System Concepts Silberschatz and Galvin19995.27Operating System Concepts Silberschatz and Galvin 19994.27 27 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Multilevel Paging and Performance • Since each level is stored as a separate table in memory, covering a logical address to a physical one may take four memory accesses. • Even though time needed for one memory access is quintupled, caching permits performance to remain reasonable. • Cache hit rate of 98 percent yields: effective access time = 0.98 x 120 + 0.02 x 520 = 128 nanoseconds. which is only a 28 percent slowdown in memory access time.
  • 28. Operating System Concepts Silberschatz and Galvin19998.28Operating System Concepts Silberschatz and Galvin19995.28Operating System Concepts Silberschatz and Galvin 19994.28 28 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Inverted Page Table • One entry for each real page of memory. • Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page. • Decreases memory needed to store each page table, but increases time needed to search the table when a page reference occurs. • Use hash table to limit the search to one — or at most a few — page-table entries.
  • 29. Operating System Concepts Silberschatz and Galvin19998.29Operating System Concepts Silberschatz and Galvin19995.29Operating System Concepts Silberschatz and Galvin 19994.29 29 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Inverted Page Table Architecture
  • 30. Operating System Concepts Silberschatz and Galvin19998.30Operating System Concepts Silberschatz and Galvin19995.30Operating System Concepts Silberschatz and Galvin 19994.30 30 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Shared Pages • Shared code – One copy of read-only (reentrant) code shared among processes (i.e., text editors, compilers, window systems). – Shared code must appear in same location in the logical address space of all processes. • Private code and data – Each process keeps a separate copy of the code and data. – The pages for the private code and data can appear anywhere in the logical address space.
  • 31. Operating System Concepts Silberschatz and Galvin19998.31Operating System Concepts Silberschatz and Galvin19995.31Operating System Concepts Silberschatz and Galvin 19994.31 31 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Shared Pages Example
  • 32. Operating System Concepts Silberschatz and Galvin19998.32Operating System Concepts Silberschatz and Galvin19995.32Operating System Concepts Silberschatz and Galvin 19994.32 32 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 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, local variables, global variables, common block, stack, symbol table, arrays
  • 33. Operating System Concepts Silberschatz and Galvin19998.33Operating System Concepts Silberschatz and Galvin19995.33Operating System Concepts Silberschatz and Galvin 19994.33 33 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Logical View of Segmentation 1 3 2 4 1 4 2 3 user space physical memory space
  • 34. Operating System Concepts Silberschatz and Galvin19998.34Operating System Concepts Silberschatz and Galvin19995.34Operating System Concepts Silberschatz and Galvin 19994.34 34 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Segmentation Architecture • Logical address consists of a two tuple: <segment-number, offset>, • Segment table – maps two-dimensional physical addresses; each table entry has: – base – contains the starting physical address where the segments reside in memory. – limit – specifies the length of the segment. • Segment-table base register (STBR) points to the segment table’s location in memory. • Segment-table length register (STLR) indicates number of segments used by a program; segment number s is legal if s < STLR.
  • 35. Operating System Concepts Silberschatz and Galvin19998.35Operating System Concepts Silberschatz and Galvin19995.35Operating System Concepts Silberschatz and Galvin 19994.35 35 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Segmentation Architecture (Cont.) • Relocation. – dynamic – by segment table • Sharing. – shared segments – same segment number • Allocation. – first fit/best fit – external fragmentation
  • 36. Operating System Concepts Silberschatz and Galvin19998.36Operating System Concepts Silberschatz and Galvin19995.36Operating System Concepts Silberschatz and Galvin 19994.36 36 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Segmentation Architecture (Cont.) • Protection. With each entry in segment table associate: – validation bit = 0  illegal segment – read/write/execute privileges • Protection bits associated with segments; code sharing occurs at segment level. • Since segments vary in length, memory allocation is a dynamic storage-allocation problem. • A segmentation example is shown in the following diagram
  • 37. Operating System Concepts Silberschatz and Galvin19998.37Operating System Concepts Silberschatz and Galvin19995.37Operating System Concepts Silberschatz and Galvin 19994.37 37 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Sharing of segments
  • 38. Operating System Concepts Silberschatz and Galvin19998.38Operating System Concepts Silberschatz and Galvin19995.38Operating System Concepts Silberschatz and Galvin 19994.38 38 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Segmentation with Paging – MULTICS • The MULTICS system solved problems of external fragmentation and lengthy search times by paging the segments. • Solution differs from pure segmentation in that the segment-table entry contains not the base address of the segment, but rather the base address of a page table for this segment.
  • 39. Operating System Concepts Silberschatz and Galvin19998.39Operating System Concepts Silberschatz and Galvin19995.39Operating System Concepts Silberschatz and Galvin 19994.39 39 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 MULTICS Address Translation Scheme
  • 40. Operating System Concepts Silberschatz and Galvin19998.40Operating System Concepts Silberschatz and Galvin19995.40Operating System Concepts Silberschatz and Galvin 19994.40 40 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Segmentation with Paging – Intel 386 • As shown in the following diagram, the Intel 386 uses segmentation with paging for memory management with a two- level paging scheme.
  • 41. Operating System Concepts Silberschatz and Galvin19998.41Operating System Concepts Silberschatz and Galvin19995.41Operating System Concepts Silberschatz and Galvin 19994.41 41 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Intel 30386 address translation
  • 42. Operating System Concepts Silberschatz and Galvin19998.42Operating System Concepts Silberschatz and Galvin19995.42Operating System Concepts Silberschatz and Galvin 19994.42 42 toOperating System Concepts | Silberschatz and Galvin 1999https://github.com/syaifulahdan/ 42 Comparing Memory-Management Strategies • Hardware support • Performance • Fragmentation • Relocation • Swapping • Sharing • Protection