You are on page 1of 11

O P E R AT I N G S Y S T E M

STRUCTURES
B Y: Aniruddha Halder

Wo m e n ’s P o l y t e c h n i c , C h a n d a n n a g a r

Courtesy: https://www.tutorialspoint.com/operating_system/
https://www.geeksforgeeks.org/
System Components
• Process Management: Process is the execution of a program that performs
Process management involves variousthe actions
tasks like specified
creation, in that program.
scheduling, It can of
termination be
processes, and a dead lock. defined as an execution unit where a program runs.
The OS must allocate resources that enable processes to share and exchange information. It
also protects the resources of each process from isother
Process methods
a program and
that is allows synchronization
under execution, which
among processes. is an important part of modern-day operating
Process Architecture: • The Stack stores temporary data like function parameters,
systems.returns addresses, and local variables.
• Allocates memory, which may be processed during its run
time.
•  It contains the variable.
• Text Section includes the current activity, which is
represented by the value of the Program Counter.
System Components
• Memory Management: Main Memory is central to the operation of a modern computer. Main
In a multiprogramming computer, Memory is a large array of words or bytes, ranging in size from hundreds of
the operating
thousands to billions. Main memory is a repository of rapidly available
system resides in a part of memory and the rest
information is by the CPU and I/O devices. Main memory is the place
shared
used by multiple processes.  where programs and information are kept when the processor is effectively
utilizing them.  Main memory is associated with the processor, so moving
instructions and information into and out of the processor is extremely fast.
The task of subdividing the memory
 Main memoryamong is also known as RAM (Random Access Memory). This
different processes is called memorymemory is a volatile memory. RAM lost its data when a power interruption
management.
occurs.
Memory management is a method in the operating
system to manage operations between main
memory and disk during process execution. The
main aim of memory management is to achieve
efficient utilization of memory.  
System Components
• I/O Management: One of the important jobs of an Operating System is to manage various
I/O devices including mouse, keyboards, touch pad, disk drives, display
Operating System has a certain adapters,
portion of USB
code that is
devices, Bit-mapped screen, LED, Analog-to-digital
dedicated to managing Input / Output in order to On/off
converter, improve the network connections, audio I/O, printers etc.
switch,
reliability and the performance of the system. A computer
system contains CPUs and more than one device controllers
connected to a common bus channel, generally referred to as
the device driver. These device drivers provide an interface to
I/O devices for communicating with the system hardware
promoting ease of communication providing access to shared
memory.

Operating system is used to manage files of computer system. A file is


• File Management: collection of specific information stored in the memory of computer
system. File management is defined as the process of manipulating files in
computer system, its management includes the process of creating,
modifying and deleting the files.
System Components
• Disk Management: Most computer systems employ secondary storage devices (magnetic
The operating system must be able todisks).
locate Iteach
provides
file andlow-cost, non-volatile storage for programs and data
perform read and write operations on(tape, optical itmedia,
it whenever needs flash drives, etc.). Programs and the user data they
to. Therefore, the operating systemuseis are kept on separate
responsible for storage devices called files. The operating system
is responsible
configuring the file system, ensuring the safety for and
allocating space for files on secondary storage media as
needed. to secondary
reliability of reading and write operations
storage, and maintains access times (the time required to
write data to or read data from secondary storage). 

Disk management of the operating system includes:


• Disk Format
• Booting from disk

• Bad block recovery


Operating System Services
An Operating System supplies different kinds of services to both the users and to the programs as well. It also
provides application programs (that run within an Operating system) an environment to execute it freely. It
provides users the services run various programs in a convenient manner.

List of common services offered by an almost all operating systems:


• User Interface
• Program Execution
• File system manipulation
• Input / Output Operations
• Communication
• Resource Allocation
• Error Detection
• Accounting
• Security and protection
System Calls
A system call is the programmatic way in which a computer program requests a service from the kernel of the
operating system it is executed on. A system call is a way for programs to interact with the operating system.

Types of System Calls :


• Process control: end, abort, create, terminate, allocate and free memory.
• File management: create, open, close, delete, read file etc.
• Device management: Different System Calls Windows Unix / Linux
CreateProcess() fork()
• Information maintenance Process Control ExitProcess()
WaitForSingleObject()
exit()
wait()

• Communication CreateFile() open()


ReadFile() read()
File Manipulation
• Protection WriteFile()
CloseHandle()
write()
close()

SetConsoleMode() ioctl()
Device Manipulation ReadConsole() read()
WriteConsole() write()

GetCurrentProcessID() getpid()
Information Maintenance SetTimer() alarm()
Sleep() sleep()

CreatePipe() pipe()
Communication CreateFileMapping() shmget()
MapViewOfFile() mmap()

SetFileSecurity() chmod()
Protection InitlializeSecurityDescriptor() umask()
SetSecurityDescriptorGroup() chown()
Operating System Structure
The operating system is such a complex structure, it should be created with utmost care so it can be used and
modified easily. An easy way to do this is to create the operating system in parts. Each of these parts should be
well defined with clear inputs, outputs and functions.
Simple Structure:
There are many operating systems that have a rather simple structure. These started as small systems and rapidly
expanded much further than their scope.
A common example of this is MS-DOS.
Layered Structure:
One way to achieve modularity in the operating system is the layered
approach. In this, the bottom layer is the hardware and the topmost layer
is the user interface.
An example of layered Structure is Windows-NT.
Operating System Structure
Monolithic Structure:
The monolithic operating system is a very basic operating system in
which file management, memory management, device management,
and process management are directly controlled within the kernel.
The kernel can access all the resources present in the system. In
monolithic systems, each component of the operating system is
contained within the kernel.

Example: MS Dos, CP/M


Microkernel Structure:
The microkernel is a type of kernel that allows customization of the operating
system. It runs on privileged mode and provides low-level address space
management and Inter-Process Communication (IPC). Moreover, OS services
such as file system, virtual memory manager, and CPU scheduler are on top
of the microkernel. Each service has its own address space to make them
secure. Besides, the applications also have their own address spaces.
Therefore, there is protection among applications, OS Services, and kernels.
Booting & Dual Booting
The procedure of starting a computer by loading the kernel is known as Booting the system. Hence it needs a
special program, stored in ROM to do this job known as the Bootstrap loader. Example: BIOS

Booting is a startup sequence that starts the operating system of


a computer when it is turned on. A boot sequence is the initial
set of operations that the computer performs when it is switched
on. Every computer has a boot sequence. Bootstrap loader
locates the kernel, loads it into main memory and starts its
execution. In some systems, a simple bootstrap loader fetches a
more complex boot program from disk, which in turn loads the
kernel.

Dual Booting:
When two operating system are installed on the computer system then it is called dual booting. In fact multiple
operating systems can be installed on such a system. But how system knows which operating system is to boot?
A boot loader that understand multiple file systems and multiple operating system can occupy the boot
space.Once loaded, it can boot one of the operating systems available on the disk.The disk can have multiple
partitions, each containing a different type of operating system. When a computer system turn on, a boot
manager program displays a menu, allowing user to choose the operating system to use.
Virtual Machine
A virtual machine app creates a virtualized
environment — called, simply enough, a virtual
machine — that behaves like a separate computer
system, complete with virtual hardware devices. The
VM runs as a process in a window in the current
operating system. You can boot an operating system
installer disc (or live CD) inside the virtual machine,
and the operating system will be “tricked” into thinking
it’s running on a real computer. It will install and run
just as it would on a real, physical machine. Whenever
you want to use the operating system, you can open the
virtual machine program and use it in a window on
your current desktop.

You might also like