New Page 1
Welcome to basicsofcomputer.com
 

Share This Free Knowledge With Your Friends:

Home » Memory Management in Operating System » Swapping Concept in Operating System

Swapping Concept in Operating System:

Definition and Explanation:

A process cannot be executed in the CPU unless it is completely or partly in memory. A process not executing in CPU (for example, in the ready queue) can be completely swapped out of memory to a backing store (usually a high-speed disk). It can then be swapped in to memory when it needs to be executed.

If compile-time or load-time binding is used, a process must be swapped back in to the exact memory locations it was swapped out of. If execution-time binding is used, a process can be swapped in to a different memory location.

The swapping is done by swapper. If dispatcher tries to load a process into CPU to discover that it is not currently in memory, it calls the swapper to swap the process back in to memory. The dispatcher, the swapper or the loader must handle the policy questions of where to swap in a process and which processes to swap out when necessary.

The major part of the swap time is the transfer time. When choosing a process to swap out, we would prefer to swap out as small a process as possible. It would be nice if we do not have to swap out the entire process.

Swapping is complicated by I/O. Suppose a process has pending I/O requests and the I/O requests are completed by reading from or writing to memory locations inside the process. The process may use memory from some other process.

There are two solutions:

  • Never swap a process with pending I/O
     
  • Have all I/O requests read from or write to operating system buffers that are never swapped out

Relevant Articles:

Introduction to Memory Management in Operating System
Basic Memory Management Requirements/Principles/Mechanism in Operating System
Contiguous & Non-Contiguous Storage Allocation in Memory Management
Swapping Concept in Operating System
Memory Allocation Methods in Operating System
Logical vs. Physical Address Space
Paging in Operating System
Page Table Structure and Hardware Support
Segmentation in Operating System
Segmentation with Paging in Operating System
 
New Page 1

Basic Computer Science

   
» The Age of Information

» Types of Computer and Digital Age

» Input and Output Devices

» Storage Devices Of Computer

» Central Processing Unit

» Software: The Power Behind The Power

» Data Communication and Computer Networks

» The Nature Of Information

» The System Theory

» Transaction Processing System (TPS) and Management Information System (MIS)

» Decision Support System (DSS) and Executive Support System (ESS)

» Expert System (ES) and Office Information System (OIS)

 

Operating Systems

   
» Introduction to Operating System

» Introduction to Process Management

» Threads and CPU Scheduling

» Process Synchronization in Operating System

» Deadlocks

» Memory Management in Operating System

» Virtual Memory in Operating System

» File System Management in Operating System

» I/O and Device Management

» Security

» Linux Operating System

 

Database Management System

   
» Introduction to Database Systems

» Database System Architecture

» Database Administration and Database Development Process

» The Entity-Relationship Model

» Semantic Object Model

» Logical Database Design and Relational Data Model

» Normalization in Database

» Transformation of E-R Model into Relational Data Model

» Representing Semantic Object Model and Types of Semantic Object Model

» Physical Database Design

» Introduction to Structured Query Language (SQL)

» Implementation of Relational Database and Database Application Design

» Client Server Database Systems & Open Database Connectivity (ODBC)

 

Questions and Answers

   
» Basics of Information Technology

» Computer Architecture

» Data Communication

» Information Networks

» Fundamentals of the Internet

» Application and Uses of Computer

» Security, Copyright and The Law

» Windows Operating Systems

» Spreadsheet Software

» Process Management in CPU

» CPU Scheduling

» Process Synchronization

» Deadlocks

» Memory Management

» Database Systems

» Database System Architecture

» Database Administration and Database Development Process
 
 
New Page 1
 

Home                Dictionary                 Contact us                   About us                    Privacy policy                  Link to us                   Advertise

Copy right ©  2012