Microsoft Windows Operating System family has a
programming interface which is known as Application Program Interface (API)
which provides services like Graphical User Interface (GUI), system resource
access, audio, video etc. this API has thousands of subroutines such as
CreateProcess and CreateFile. Some major categories of API provide the following
1. Component Services
2. Base Services
6. Web Services
When these services are being observed from
programming point of view, it could be referred to as a callable job in an
operating system. However, the services are considered to as processes (from a
user’s perspective) that are brought in user mode by the operating system,
which are not dependent on logged-in user.
Considering the following figure:
Both user and kernel modes are separated by a line in the
above figure. It is important to remember that user mode has fewer privileges
than kernel mode. User mode uses applications that are well defined. The user
mode process has no direct access to hardware or memory. It is also limited to
an assigned memory space. User mode processes can be paged out of secondary memory
into RAM on a hard disk.
At the top right of the figure indicates the environment
subsystems which offer visible recognized interface between applications and
native APIs. The environment subsystem is used to decodes environment explicit commands
from the application into the directives that the Executive Services (which is
the first layer of the kernel) can transmit out.
Moving to the kernel mode which has direct admittance to
the memory and hardware, which also includes the memory spaces of all the
user-mode processes. The kernel mode components include the followings:
1. It has direct access to the hardware.
2. Kernel can access all the memory of the computer.
3. It does not move to main memory page file on hard disk.
4. Kernel mode processes have got higher priority than the
user mode processes.
Memory in Windows:
Memory management is the process of directing and managing
the memory in computer, allocating portion also known as block to different
program which are in execution, to improve the overall system performance. It exists
in Operating System hardware, and in programs and applications.
A deeper understanding about memory leads on a particular
system has turn into an important matter for system designer. Unlike other
operating system, windows perform so many refined operations to be done with
its job. Memory involves process, child process then threads and other
different aspects to complete a command from users.
It is important to know that memory is a physical
location which is used to store some instruction or sequence of instructions.
Now, this memory can be of two types i.e. the first one is primary memory and
the second one is secondary memory. The primary memory is used in physical
systems for the information which works at high rate (i.e. RAM). Unlike
secondary memory which is used for physical devices for program and storage of
date which are slow to access but provide high memory capacity.
Primary memory is frequently related with addressable
semiconductor memory. There are further two types of semiconductor memory, i.e.
first one is the volatile and the other one is non-volatile (i.e. flash
memory). The hardware memory management components of today’s CPUs offer a way
for the OS to plot virtual address on the physical address. The windows memory
manager requires a demanded paged virtual memory subsystem.
Whenever any process requests for a page, it brings the very
first i.e. the oldest page first and these pages are not even over-writable
because they only signify a copy of data that was used by this process once. So
Windows preserve those on some paging list. Windows memory manager keeps track
of this is in such a way that it keeps track of this unassigned memory in one
of the four paging lists.
Following are the types of paging list:
It is of definite location with limited lists. It is a must
for Windows memory manager to choose this location (or list) while executing a page
The zero-page list has a mutual feature, i.e. it has to
be of definite sized. When it gets that size, a zero-page thread (also known as
kernel thread) is aroused and that also runs in priority 0. Further, Windows
may also need zeroed pages. The work that zero-page thread performs is that, it
has to zero out all those pages.
& Standby page list:
Memory manager pulls-out a page from a working set of a
process. But that page may still have needed by that process and it is possible
that it may have to be reprocessed by the process if it requests for that page
again. Therefore, it may signify a code and be reused by another process as
Storage and Management:
There are two tasks that need to be accomplished, while
managing computer’s memory:
1. Each process must have sufficient memory to be executed,
and it can neither run into the memory space of another process nor be run into
by another process.
2. The system must use different types of memory properly so
that each process can execute most effectively.
The first task requires the operating system to set up
memory boundaries for types of software and for separable applications.
Let us consider the above figure as an imaginary small
system with 1MB of RAM. During the boot process, the above computer’s OS is planned
to go to the topmost of existing memory and then “back up” far sufficient
to meet up the requirements of the operating system.
Suppose that the operating system necessities 300KB to
run. Now, the operating system goes to the end of the RAM pool and then it starts
building up with the several driver software required to control the computer hardware
subsystems. In our supposed computer, the drivers take 200KB. There are still
500KB available for the application processes after the OS has been completely
loaded. The application process will be loaded in the defined blocks with their
respective starting and ending on boundaries. These blocks and boundaries help
to ensure that applications won’t be loaded on top of one another’s space by a
poorly calculated bit or two. These blocks and the defined boundaries will
ensure that none of the application would be loaded on another’s another just
by a bad calculated bit. The problem arises when there is no space for the
upcoming application process when the space is occupied.
In Windows, it is
possible to add more memory beyond the memory size. So for that, in comparison
with RAM, disk space is quite cheap, then also moving instructions in RAM to
hard disk can significantly increase RAM space at no expense. This method is
called virtual memory management.
Disk storage is one of the memory types. It is the only
one that must be controlled by the operating system itself. Followings are the
types of memory in a computer system in the increasing order with respect to
It is the fast, comparatively small amounts of memory that are available to the
CPU. Cache controllers predict which data will be next fetch from the main
Main Memory –
This is the RAM that you measured in MBs when you purchase a computer.
Secondary memory –
It is mostly of a magnetic tape that preserves applications and data available
so that it can be used.
The operating system must stabilize the desires of the several
processes with the accessibility of the different types of memory, transferring
the data in block (which is called a page) between existing memory as process