Page 201 - DCAP103_Principle of operating system
P. 201
Principles of Operating Systems
Notes 10. Thrashing can be avoided if
( a) the pages, belonging to the working set of the programs, are in main memory.
( b) the speed of CPU is increased.
( c) the speed of I/O processor is increased.
( d) all of the above.
5.13 Summary
• The memory management algorithms vary from a primitive bare-machine approach to
paging and segmentation strategies.
• The main memory must accommodate both the operating system and the various user
processes. We therefore need to allocate different parts of the main memory in the most
efficient way possible.
• Paging is a memory-management scheme that permits the physical-address space of a
process to be noncontiguous.
• Hardware Support Each operating system has its own methods for storing page tables.
• Most allocate a page table for each process.
• Memory protection in a paged environment is accomplished by protection bits 11 that are
associated with each frame. Normally, these bits are kept in the page table.
• Another advantage of paging is the possibility of sharing common code.
• Swapping and paging can lead to quite a large system overhead.
• A demand-paging system is similar to a paging system.
• A FIFO replacement algorithm associates with each page the time when that page was
brought into memory.
5.14 Keywords
Compile Time: It refers to either the operations performed by a compiler (the “compile-time
operations”), programming language requirements that must be met by source code for it to
be successfully compiled (the “compile-time requirements”), or properties of the program that
can be reasoned about at compile time.
Fragmentation: A multiprogrammed system will generally perform more efficiently if it
has a higher level of multiprogramming. For a given set of processes, we can increase the
multiprogramming level only by packing more processes into memory. To accomplish this task,
we must reduce memory waste or fragmentation. Systems with fixed-sized allocation units,
such as the single-partition scheme and paging, suffer from internal fragmentation. Systems
with variable-sized allocation units, such as the multiple-partition scheme and segmentation,
suffer from external fragmentation.
Global Descriptor Table (GDT): Is specific to the IA32 architecture. It contains entries telling
the CPU about memory segments. A similar Interrupts Descriptor Table exists containing tasks
and interrupts descriptors. Read the GDT Tutorial.
Hashed Page Tables: A common approach for handling address spaces larger than 32 bits.
Local Descriptor Table (LDT): Is a memory table used in the x86 architecture in protected
mode and containing memory segment descriptors: start in linear memory, size, executability,
writability, access privilege, actual presence in memory.
194 LOVELY PROFESSIONAL UNIVERSITY