Definition: A computer can address more memory than the amount
physically installed on the system. This extra memory is actually called virtual
memory and it is a section of a hard disk that's set up to emulate the
computer's RAM.
The main visible advantage of this scheme is that programs can be larger than
physical memory. Virtual memory serves two purposes. First, it allows us to
extend the use of physical memory by using disk. Second, it allows us to have
memory protection, because each virtual address is translated to a physical
address.
Demand Paging: A demand paging system is quite similar to a paging system
with swapping where processes reside in secondary memory and pages are loaded
only on demand, not in advance.
Page Replacement Algorithm: Page replacement algorithms are the techniques using which
an Operating System decides which memory pages to swap out, write to disk when
a page of memory needs to be allocated
Reference String: The string of memory references is called reference string.
FIFO Algorithm: Oldest page in the main memory is the one that will be selected
for replacement
I/O Hardware
Block devices: A block device is
one with which the driver communicates by sending entire blocks of data. For
example, Hard disks, USB cameras, Disk-On-Key, etc.
Character devices: A character
device is one with which the driver communicates by sending and receiving
single characters (bytes, octets). For example, serial ports, parallel ports,
sound cards, etc.
Device Controller: Device drivers are software modules that can be plugged into
an OS to handle a particular device.
The Device Controller works like an interface between a
device and a device driver. I/O units Keyboard, mouse, printer, etc.) Typically
consist of a mechanical component and an electronic component where the electronic
component is called the device controller. There is always a device controller
and a device driver for each device to communicate with the Operating system.
Direct Memory Access (DMA): Direct Memory Access (DMA) means CPU grants I/O module
authority to read from or write to memory without involvement. DMA module
itself controls the exchange of data between the main memory and the I/O device. CPU is
only involved at the beginning and end of the transfer and interrupted only
after the entire block has been transferred.
Polling I/O vs Interrupts I/O: Polling is the simplest way for an I/O device to communicate
with the processor. The process of periodically checking the status of the device
to see if it is time for the next I/O operation is called polling.
An alternative scheme for dealing with I/O is the
interrupt-driven method. An interrupt is a signal to the microprocessor from a
device that requires attention.
Input/Output Software
User Level Libraries: This provides a simple interface to the user program to perform
input and output. For example, stdio is a library provided by C and C++ programming
languages.
Kernal Level Libraries: This provides a device driver to interact with the device controller
and device-independent I/O modules.
Hardware: This layer includes actual hardware and hardware controller
which interact with the device drivers and makes hardware alive.
Device Drivers: Device drivers are software modules that can be plugged into
an OS to handle a particular device.
Interrupt Handlers: An interrupt handler, also known as an interrupt service
routine or ISR, is a piece of software or more specifically a callback function
in an operating system or more specifically in a device driver, whose execution
is triggered by the reception of an interrupt.
Device Independent I/O Software: The basic function of the device-independent software is to
perform the I/O functions that are common to all devices and to provide a
uniform interface to the user-level software.
User-Space I/O Software: These are the libraries that provide a richer and simplified
interface to access the functionality of the kernel or ultimately interact
with the device drivers.
Kernal I/O Subsystem (Scheduling, Buffering, Caching,
Spooling and Device Reservation, Error Handling):
Caching - Kernel maintains cache memory which is a region of
fast memory that holds copies of data. Access to the cached copy is more
efficient than access to the original.
Comments
Post a Comment