Unit-I-R23 PPT OS
Unit-I-R23 PPT OS
UNIT I
Operating Systems Overview: Introduction, Operating
system functions, Operating system
structure, operating systems Operations, protection and
security, Computing Environments, Open- Source
Operating Systems
System Structures: Operating System Services, User
and Operating-System
Interface, systems calls, Types of System Calls, system
programs, operating system
structure, operating system debugging, System Boot.
What is an Operating System?
• A program that acts as an intermediary between a user of a computer
and the computer hardware.
• An operating System is a collection of system programs that together
control the operations of a computer system.
• Some examples of operating systems are UNIX, Mach, MS-DOS, MS-
Windows, Windows/NT, Chicago, OS/2, MacOS, VMS, MVS, and
VM.
Operating system goals
• Execute user programs and make solving user problems easier.
• Make the computer system convenient to use.
• Use the computer hardware in an efficient manner
Computer System Components
Hardware Resources
• A Computer System consists of various hardware components such as
8
Operating System is a control program ,that controls and co-
ordinates all the activities performed with in the computer
system
9
Operating System Functions/Services/Tasks
Providing User Interface
Program Development and Execution
Memory Management
Processor Management
Process Management
Device Management (Facilitating I/O)
File Management
Protection and Security
Control over system performance
Job and Resource usage Accounting
Error detecting aids
Coordination between other software and users
Handling Network Communications
Providing User Interface
• OS provides an interface to the user to interact with a computer
A user interface (UI) refers to the part of an operating system, program, or device that
allows a user to enter and receive information.
GUI
CLI
Graphical user interface (GUI)
• Most common interface
• Windows OS X
• Uses a mouse to control objects
• Uses a desktop
• Shortcuts open programs or documents
• Task switching
• Dialog boxes allow directed input
Command line interfaces(CLI)
• Older interface
• DOS, Linux, UNIX
• User types commands at a prompt
• User must remember all commands
• Included in all GUIs
2. Program development and
Execution
• It provides editors and debuggers to assist (help) the programmer in
creating programs.
Memory Management
An Operating System does the following activities for memory
management:
➢ Keeps track of primary memory i.e. what part of it are in use by
whom what part are not in use.
➢ In multiprogramming the OS decides which process will get memory
when and how much.
➢ Allocates the memory when a process requests it.
➢ De-allocates the memory when a process no longer needs it or has
been terminated
Processor Management
An Operating System does the following activities for
processor management −
• Keeps tracks of processor and status of processor. The
program responsible for this task is known as traffic
controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer
required.
Process Management
• A process is a program in execution.
The OS is responsible for the following activities of the
process management
1. It helps to create new files in computer system and placing them at the
specific locations.
2. It helps in easily and quickly locating these files in computer system.
3. It makes the process of sharing of the files among different users very
easily and user friendly.
4. It helps to stores the files in separate folders known as directories. These
directories help users to search file quickly or to manage the files according
to their types or uses.
5. It helps the user to modify the data of files or to modify the name of the
file in the directories.
Protection and Security
21
Handling network communications : Providing
communication b/w two computers
22
Control over system performance : Recording delays
between request for a service and response from the system.
Coordination between other softwares and users −
Coordination and assignment of compilers, interpreters,
assemblers and other software to the various users of the
computer system
23
OPERATING SYSTEM STRUCTURE
Uni Programming
Multi Programming
Multi Tasking
Multi Processing
Multi Threadding
24
25
26
Multi Tasking
27
Multi Processing
Multiprocessing refers to the hardware (i.e., the CPU units) rather than the software
(i.e., running processes).
28
Multi threading –
A thread is a basic unit of CPU utilization. Multi threading is an execution model that
allows a single process to have multiple code segments (i.e., threads) running
concurrently within the “context”of that process.
e.g. VLC media player, where one thread is used for opening the VLC media player,
one thread for playing a particular song and another thread for adding new songs to
the playlist.
29
COMPUTING ENVIRONMENTS
Computing Environment is a collection of computers which are
used to process and exchange the information to solve various
types of computing problems.
TThe following are the various types of computing environments
31
Time Sharing Computing Environment
Time sharing computing environment is stand alone computer in which a single user
can perform multiple operations at a time by using multitasking operating system.
Here the processor time is divided among different tasks and this is called “Time
sharing”. For example, a user can listen to music while writing something in a text
editor. Windows 95 and later versions of windows OS, iOS and Linux operating
systems are the examples for this computing environment.
32
Client Server Computing Environment
The client server environment contains two machines (Client machine and Server
machine). These both machines will exchange the information through an
application. Here Client is a normal computer like PC, Tablet, Mobile, etc., and
Server is a powerful computer which stores huge data and manages huge amount
of file and emails, etc., In this environment, client requests for data and server
provides data to the client.
33
Distributed Computing Environment
In the distributed computing environment, the complete functionality of a software is
not on single computer but is distributed among multiple computers. Here we use a
method of computer processing in which different programs of an application run
simultaneously on two or more computers. These computers communicate with each
other over a network to perform the complete task. In distributed computing
environment, the data is distributed among different systems and that data is
logically related to each other.
34
Peer-to-Peer Computing
• Another model of distributed system
• P2P does not distinguish clients and servers
• Instead all nodes are considered peers
• May each act as client server or both
• Advantage over traditional client-server system is that the server is a
bottleneck. But in a P2P system services can be provided by several nodes.
35
Peer-to-Peer Computing
37
Grid Computing Environment
Grid computing serves computing resources such as network, server,
applications to the individual users. Grid involves the loosely coupled
systems in which jobs are managed and scheduled in a distributed way. It
divides a massive job in smaller chunks and processes those chunks
separately. Grid computing is a combination of non-centralized computing
resources where each geographically separate, independent site has its
own administrative control over it.
38
39
Cloud Computing Environment
Cloud computing is a modern computing paradigm which provides
scalable and flexible IT infrastructure and essential services to the users
through the internet.
40
41
The difference between a cloud and a grid can be expressed as below:
42
Cluster Computing Environment
Cluster computing is a collection of inter connected computers connected by LAN .
These computers work together to solve a single problem. In cluster computing
environment, a collection of systems work together as a single system. Cluster is
tightly coupled . clusters are made up of machines with similar hardware
43
Web-Based Computing
• Web has become ubiquitous(being present everywhere at once)
• Now load balancers are used to manage web traffic among similar servers
• Use of operating systems like Windows 95 client-side have evolved into Linux and
Windows XP which can be clients and servers
44
Web-Based Computing
45
Open-Source Operating Systems
• Operating systems made available in source-code format rather than just binary closed-source
• Started by Free Software Foundation (FSF) which has “copyleft” GNU Public License (GPL)
• Copyrights exist in order to protect authors of documentation or software from unauthorized copying
or selling of their work. A copyright infers that only with the author's permission may such activities
take place.
• Copyleft overrides copyright and promotes the concept that materials be freely used, copied and
modified by others. Copyleft also requires all modified and extended versions of the material also be
freely accessible, used and modified by others.
• Examples include GNU/Linux BSD(Berkeley Software Distribution) UNIX (including core of Mac OS X)
and Sun OpenSolaris , Ubuntu , ReactOS , Haiku OS
46
Ubuntu
The most widely used open source data base is Ubuntu. It is a Linux based operating system and is
distributed free along with the source code. Its desktop looks somewhat similar to that of Windows,
with window controls and icons. There is reasonable large software support available on Ubuntu; the
common applications include Mozilla Firefox web browser, LibreOffice office application suite, GIMP
image editor and so on.
Ubuntu is distributed under GNU and GPL license. It has UNIX shell called as Terminal that can be
used to interact with the network and install third-party applications.
OpenSolaris
OpenSolaris is a computer operating system developed by Sun Microsystems. It runs well on
desktops, laptops, servers and data centers. OpenSolaris is GUI based like Ubuntu and has rich
graphical desktop and windows for easy navigation.
FreeBSD
FreeBSD is an advanced operating system for x86 compatible (including Pentium and Athlon), AMD64
compatible. It is popular among network developers, as FreeBSD offers advanced networking,
performance, security and compatibility features. Most software that runs on Linux can run on
FreeBSD without the need for any compatibility layer.
47
ReactOS
It is a free Windows compatible OS that offers the benefits of running Windows apps natively. Apart
from being an open-source software (its main highlight), the tool has one really cool feature that
Windows failed to offer – An application manager very much similar to Linux package manager.
Haiku OS
What most users like about this OS is its uniformity and cohesiveness.
To start up the operating system, one simply inserts the thumb drive into a USB port and reboot.
This should not pose a problem as most modern computers these days can be set to boot from the
USB key. The OS is fast and responsive. Moreover, it is equipped with a number of applications and
demos pre-installed.
48
Operating-System Operations:
Safe Mode
Privileged Mode
1. simple ( unstructured )
2. Monolithic (one unstructured program)
3. Layered
4. Microkernel
5. Modular
6. Hybrid Systems
Simple Structure -- MS-DOS
• MS-DOS – written to
provide the most
functionality in the least
space
• Not divided into
modules
• Although MS-DOS has
some structure, its
interfaces and levels of
functionality are not
well separated
Non Simple Structure or Monolithic --
UNIX
Traditionally, systems such as Unix were built as a monolithic kernel:
The UNIX OS consists of two separable parts
• Systems programs
• The kernel
• Consists of everything below the system-call interface and above the physical
hardware
• Provides the file system, CPU scheduling, memory management, and other operating-
system functions; a large number of functions for one level
user programs
hardware
• System expansion can also be easier, because it only involves adding more
system applications, not rebuilding a new kernel.
• Mach was the first and most widely known microkernel, and now forms a
major component of Mac OSX.
• Windows NT was originally microkernel, but suffered from performance
problems relative to Windows 95. NT 4.0 improved performance by moving
more services into the kernel, and now XP is back to being more monolithic.
• Another microkernel example is QNX, a real-time OS for embedded systems.
• Benefits:
• Easier to extend a microkernel
• Easier to port the operating system to new architectures
• More reliable (less code is running in kernel mode)
• More secure
• Detriments:
• Performance overhead of user space to kernel space communication
Microkernel System Structure
Modular kernel
• Many modern operating systems implement loadable
kernel modules
• Uses object-oriented approach
• Each core component is separate
• Each talks to the others over known interfaces
• Each is loadable as needed within the kernel
• Overall, similar to layers but with more flexible
• Linux, Solaris, etc
Solaris Modular Approach
Hybrid Systems
• Most modern operating systems are actually not one pure model
• Hybrid combines multiple approaches to address performance, security,
usability needs
• Linux and Solaris kernel combines monolithic, plus modular for dynamic
loading of functionality
• Windows mostly monolithic, plus microkernel for different subsystem
personalities
ex: Mac OS X Structure