4. Definition of paging
A technique of storage management that transfer pages
from secondary storage to main storage when they are
required ,and returns them to secondary storage when
they are not.
In computer operating systems, paging is one of the
memory management schemes by which a computer
stores and retrieves data from the secondary storage for
use in main memory.
5. What is paging? Why paging is
used?
Paging is a memory management technique in which
the memory is divided into fixed size pages. Paging is
used for faster access to data. When a program needs a
page, it is available in the main memory as the OS
copies a certain number of pages from your storage
device to main memory. Paging allows the physical
address space of a process to be noncontiguous.
6. How it works?
When a page has to be loaded, one of the existing
pages must be swapped with the requested new page.
The paging system must determine the page to swap
by choosing one based on an algorithm that
determines the best choice:
Least recently used
Least frequently used
Most Recently used
7. Paging
A technique used by virtual memory operating systems to help
ensure that the data you need is available as quickly as
possible. The operating system copies a certain number
of pages from your storage device to main memory. When a
program needs a page that is not in main memory, the
operating system copies the required page into memory and
copies another page back to the disk. One says that the
operating system pages the data. Each time a page is needed
that is not currently in memory, a page fault occurs. An invalid
page fault occurs when the address of the page being
requested is invalid. In this case, the application is usually
aborted.
This type of virtual memory is called paged virtual
memory. Another form of virtual memory is segmented virtual
memory.
9. Advantages of Paging
The advantages of paging are, in Address translation where each
task has the same virtual address. Address translation will turn
fragmented physical addresses into contiguous virtual addresses.
It provides Memory protection and shared memory between
tasks that a fast type of IPC, also conserves memory when used
for DLLs.
It helps in Demand loading which prevents big load on CPU
when a task first starts running, conserves memory. Paging
requires memory mapped files, Virtual memory swapping which
let system degrade gracefully when memory required exceeds
RAM size. The process can be run whose virtual address space is
larger than physical memory.
It is flexibly in sharing machine between processes, which
address sizes exceed the physical memory size. It also supports a
wide range of user level stuff.
10. Disadvantages of Paging
The disadvantages of paging are extra resource
consumption, memory overhead for storing page
tables. The worst cases are when page table may take
up a significant portion of virtual memory. Solution is
to page the page table or go to a more complicated data
structure for translations. Other disadvantage is
translation overhead.
12. What Is Kernel?
A kernel is a central component of an operating system. It
acts as an interface between the user applications and the
hardware. The sole aim of the kernel is to manage the
communication between the software (user level
applications) and the hardware (CPU, disk memory etc).
The main tasks of the kernel are :
Process management
Device management
Memory management
Interrupt handling
I/O communication
File system...etc..
13. Definition of monolathic kernal
A monolithic kernel is an operating system architecture
where the entire operating system is working
in kernel space and is alone in supervisor mode.
The monolithic approach is to define a high-level
virtual interface over the hardware, with a set of
primitives or system calls to implement operating
system services such as process management,
concurrency, and memory management in several
modules that run in supervisor mode.
14. Monolithic Kernel:
Even if every module servicing these operations is
separate from the whole, the code integration is
very tight and difficult to do correctly, and, since
all the modules run in the same address space, a
bug in one module can bring down the whole
system.
15. Monolithic Kernel:
However, when the implementation is complete
and trustworthy, the tight internal integration of
components allows the low-level features of the
underlying system to be effectively utilized,
making a good monolithic kernel highly efficient.
16. Monolithic Architecture
Monolithic operating system
Every component contained in kernel
Any component can directly communicate with any other
Tend to be highly efficient
Disadvantage is difficulty determining source of subtle
errors
18. Monolathic kernal
A monolithic kernel is an operating system software
framework that holds all privileges to access input/output
(I/O) devices, memory, hardware interrupts and the CPU
stack. Monolithic kernels tend to be larger than other
kernels because they deal with so many aspects of
computer processing at the lowest level, and therefore have
to incorporate code that interfaces with many devices, I/O
and interrupt channels, and other hardware operators.
This form of kernel is the basis for Linux, Unix, MS-DOS
and Mac OS. Newer operating systems typically use a
hybrid kernel to allow for easier maintenance and
operating system improvements.
19. Properties of Monolithic Kernels
OS is all in one place, below the “red line”
Applications use a well-defined system call
interface to interact with kernel
Examples: Unix, Windows NT/XP, Linux, BSD,
OS/161
Common in commercial systems
20. Monolithic Kernel Advantages
Generally speaking a monolithic OS kernel
is faster due to small source and compiled
code size. Less code means also less bugs
and security issues.
direct communication among all elements
highly efficient
21. Monolithic Kernel disadvantages
Monolithic OS being a single big pile of code has
disadvantages. For example, making changes is not
easy and testing takes more time. It is hard to
maintain, patch or extend. Bug fixing or adding new
features requires the compilation of the whole source
code which is a time and resource consuming process.