Вы находитесь на странице: 1из 22

Operating Systems

Introduction
Need for an OS
User needs to be provided with services and OS
ought to facilitate the provisioning of these services.
A system should make it possible
for a users application to use the processing Unit i.e
the CPU.
A user application would need to store information.
The OS makes memory available to an application
when required.
The OS offers generic services to support operations.
These operations in turn facilitate the applications
mentioned earlier. To that extent an OS operation is
application neutral and service specific.
Functions in a nutshell
Provide a user interface
Run programs
Manage hardware devices
Organized file storage
The User System View
Operational View
Current systems based on Von-Neumann model.
The principle states that a program is initially stored in
memory and executed by fetching an instruction at a time.
The basic cycle of operation is
Fetch an instruction (Fetch)
Interpret the instruction (Decode)
Execute the instruction (Execute)
OS need to schedule the processor amongst all the
application simultaneously without giving an impression that
the processor time is being divided and scheduled per an
application.
Types of OS
Real-time operating systems.
Very fast small OS
Built into a device
Respond quickly to user input
MP3 players, Medical devices
Types of OS
Single user/Single tasking OS
One user works on the system
Performs one task at a time
MS-DOS and Palm OS
Take up little space on disk
Run on inexpensive computers
Types of OS
Single user/Multitasking OS
User performs many tasks at once
Most common form of OS
Windows XP and OS X
Require expensive computers
Tend to be complex
Types of OS
Multi user/Multitasking OS
Many users connect to one computer
Each user has a unique session
UNIX, Linux, and VMS
Maintenance can be easy
Requires a powerful computer
Managing Hardware
Programs need to access hardware
Interrupts
CPU is stopped
Hardware device is accessed
Device drivers control the hardware
What will happen if a wrong driver is installed
on a computer.?
Linux-a case study
In Sept 1991, Linus Torvalds, a second year student of
Computer Science at the University of Helsinki, developed
the preliminary kernel of Linux, known as Linux version
0.0.1
It was put to the Internet and received enormous
response from worldwide software developers
By December came version 0.10. Still Linux was little
more than in skeletal form
Linux Today
Linux has been used for many computing platforms
PC, PDA, Supercomputer,
Latest stable linux kernel version is 4.9.6 (https://www.kernel.org/).
Not only character user interface but graphical user
interface, thanks to the X-Window technology
Commercial vendors moved in Linix itself to provide
freely distributed code. They make their money by
compiling up various software and gathering them in a
distributable format
Red Hat, Slackware, etc
Chinese distribution of Linux also appeared in Taiwan
and China - CLE, Red Flag Linux
Linux Pros & Cons
Advantages over Windows
It's almost free to relatively inexpensive.
Source code is included.
Bugs are fixed quickly and help is readily available
through the vast support in Internet.
Linux is more stable than Windows.
Linux is truly multi-user and multi-tasking.
multiuser: OS that can simultaneously serve a number of
users.
multitasking: OS that can simultaneously execute a number of
programs.
Linux runs on equipment that other operating systems
consider too underpowered, e.g. 386 systems, PDA, etc
Linux Pros & Cons contd.
Disadvantages compared with Windows
My program cannot run on Linux
Isn't as popular as Windows
No one commercial company is responsible for Linux
Linux is relatively hard to install, learn and use
Hence currently, Linux is mainly used in
commercial applications, server implementation.
More than 75% current network servers are
developed based on Linux or Unix systems
Due to the relatively high reliability.
Linux System Architecture
Components
When running in main memory, linux is
divided into two parts:
User Space- user applications run here.
Kernel Space-kernel applications run here.

The system libraries (eg. glibc) define a


standard set of functions through which
applications interact with the kernel and also
implement much of the OS functionality that
does not need the full privilege of kernel code.
Kernel
The kernel is a program that constitutes the central core of
a computer operating system. It has complete control over
everything that occurs in the system.
The kernel is the first part of the operating system to load
into memory during booting (i.e., system startup).
The kernel itself does not interact directly with the user, but
rather interacts with the shell and other programs as well as
with the hardware devices on the system, including the
processor (also called the central processing unit or CPU),
memory and disk drives.
Because of its critical nature, the kernel code is usually
loaded into a protected area of memory, which prevents it
from being overwritten by other, less frequently used parts
of the operating system or by application programs.
Types of Kernel
Monolithic Kernel: Linux Kernel
Micro Kernel: Windows NT Kernel, Mach Kernel
etc.

Monolithic Kernel Micro Kernel


Monolithic Kernel
Earlier in this type all basic system services like process and
memory management, interrupt handling etc were
packaged into a single module in kernel space.
Serious drawbacks were:
Size of kernel was huge.
Poor maintainability, which means bug fixing or addition of new
features resulted in recompilation of the whole kernel which
could consume hours.
In a modern day approach to monolithic architecture, the
kernel consists of different modules which can be
dynamically loaded and un-loaded.
With this approach, maintainability of kernel became very
easy as only the concerned module needs to be loaded and
unloaded every time there is a change or bug fix in a
particular module.
Linux follows the monolithic modular approach.
Micro Kernels
Main issue is the growing size of kennel code which
becomes uncontrollable in monolithic approach.
To reduce kernel code size, it allows some basic services
like device driver management, protocol stack, file
system etc to run in user space.
In this architecture, all the basic OS services which are
made part of user space are made to run as servers
which are used by other programs in the system through
inter process communication (IPC).
eg: we have servers for device drivers, network protocol stacks, file
systems, graphics, etc.
Microkernel servers are essentially daemon programs like
any others, except that the kernel grants some of them
privileges to interact with parts of physical memory that
are otherwise off limits to most programs.
This allows some servers, particularly device drivers, to
Source: https://www.go4expert.com/articles
Some more facts
Android OS uses Linux kernel.

Windows 2000, XP, Vista, 7, 8, 8.1 and 10 uses


Windows NT kernel which is a hybrid kernel. It
consists of two main components: user and kernel
mode.

Ahybrid kernelis anoperating


systemkernelarchitecture that attempts to
combine aspects and benefits ofboth
microkernelandmonolithic kernelarchitectures.

Вам также может понравиться