Unit 1
Introduction to OS
                     1
Topic
s• Introduction: Definition of Operating system
• Operating System’s role
• Operating-System Operations
• Functions of Operating System
• Computing Environments
                                                  2
 Introductio
•n
 It is a software that works as an interface between a user and   the
  computer hardware.
• An operating system acts as an intermediatry between the user of
  a computer and computer hardware.
• The purpose of an operating system is to provide an environment
  in which a user can execute programs in a convenient and efficient
  manner.
• The primary objective of an operating system is to make computer
  system convenient to use and to utilize computer hardware in an
  efficient manner.
• The operating system performs the basic tasks such as receiving
  input from the keyboard, processing instructions and sending
  output to the screen.
                                                                  3
• An Operating System (OS) is an interface between a computer
  user and computer hardware. An operating system is a software
  which performs all the basic tasks like file management, memory
  management, process management, handling input and output,
  and controlling peripheral devices such as disk drives and
  printers.
• Some popular Operating Systems include Linux Operating
  System, Windows Operating System, VMS, OS/400, AIX, z/OS,
  etc.
                                                                4
History of Operating system
                              5
  Components of a computer system
• Hardware – provides basic computing resources CPU,
  memory, I/O devices
• Operating system-Controls and coordinates use of
  hardware among various applications and users
• Application programs – define the ways in which the system
  resources are used to solve the computing problems of the
  users
-Word processors, compilers, web browsers, database
systems, video games
• Users
- People, machines, other computers                            6
Abstract view of the components of a computer system.   7
• The operating system manages a computer's software
  hardware resources, including:
⮚Input devices such as a keyboard and mouse.
⮚Output devices such as display monitors, printers and scanners.
⮚Network devices such as modems, routers and
 network connections.
⮚Storage devices such as internal and external drives.
• The OS also provides services to facilitate the efficient
  execution and management of, and memory allocations for, any
  additional installed software application programs.
                                                                 8
OS is designed to serve two basic purposes:
1.It controls the allocation and use of the computing System’s
 resources among the various user and tasks.
2.It provides an interface between the computer hardware and the
 programmer that simplifies and makes feasible for coding,
 creation, debugging of application programs.
                                                                 9
The Operating system must support the following tasks. The
task are:
1.Provides the facilities to create, modification of programs and
 data files using an editor.
2.Access to the compiler for translating the user program from high
 level language to machine language.
3.Provide a loader program to move the compiled program code to
 the computer’s memory for execution.
4. Provide routines that handle the details of I/O programming.
                                                                    10
Two Views of Operating System
1.User's View
2.System View
1. Operating System: User View
• The user view of the computer refers to the interface being used. Such
  systems are designed for one user to monopolize its resources, to
  maximize the work that the user is performing. In these cases, the
  operating system is designed mostly for ease of use, with some attention
  paid to performance, and none paid to resource utilization.
2. Operating System: System View
• Operating system can be viewed as a resource allocator also. A computer
  system consists of many resources like - hardware and software - that
  must be managed efficiently. The operating system acts as the manager
  of the resources, decides between conflicting requests, controls execution
  of programs etc.
                                                                         11
Functions of an Operating System
                                   12
Types of Operating system
⮚Batch Operating System
⮚Multitasking/Time Sharing
 OS
⮚Multiprocessing OS
⮚Real Time OS
⮚Distributed OS
⮚Network OS
⮚Mobile OS
                             13
Batch
OS
        • This type of operating system
          does not interact with the
          computer directly. There is an
          operator which takes similar
          jobshaving      same
          requirement and group them
          into batches. It is the
          responsibility of operator to
          sort the jobs with similar
          needs.
                                      14
 Advantages and
 Disadvantage
  Advantages                              Disadvantages
• It is very difficult to guess or know   • The computer operators
  the time required by any job to           should be well known with
  complete. Processors of the batch         batch systems
  systems know how long the job
  would be when it is in queue            • Batch systems are hard to
• Multiple users can share the batch        debug
  systems                                 • It is sometime costly
• The idle time for batch system is
  very less                               • The other jobs will have to
• It is easy to manage large work           wait for an unknown time if
  repeatedly in batch systems               any job fails
                                                                          15
Time-Sharing Operating Systems
                  • Each task is given some time to
                    execute, so that all the tasks
                    work smoothly. Each user gets
                    time of CPU as they use single
                    system. These systems are also
                    known as Multitasking Systems.
                    The task can be from single
                    user or from different users also.
                    The time that each task gets to
                    execute is called quantum. After
                    this time interval is over OS
                    switches over to next task.
                                                    16
Advantages and
Disadvantage
Advantages                       Disadvantages
• Each task gets an equal        • Reliability problem
  opportunity                    • One must have to take care of
                                   security and integrity of user
• Less chances of duplication
                                   programs and data
  of software
                                 • Data communication problem
• CPU idle time can be reduced
                                                                17
Multiprogramming Operating Systems
                  • Sharing the processor, when
                    two or more programs reside
                    in memory at the same time,
                    is referred
                    as multiprogramming.
                  • Multiprogramming assumes a
                    single   shared     processor.
                    Multiprogramming increases
                    CPU utilization by organizing
                    jobs so that the CPU always
                    has one to execute.
                                                18
Advantages and
Disadvantage
Advantages                    Disadvantages
• High and efficient          • CPU scheduling is required.
  CPU utilization.            • To accommodate many
                                jobs in memory, memory
• User feels that many
                                management is required.
  programs are allotted CPU
  almost simultaneously.
                                                              19
Distributed Operating System
                • Multiple central processors are used by
                  Distributed systems to serve multiple real-time
                  applications and multiple users. Accordingly,
                  Data processing jobs are distributed among
                  the processors.
                • Processors communicate with each other
                  through various communication lines (like
                  high-speed buses or telephone lines). These
                  are known as loosely coupled systems or
                  distributed systems. Processors in this system
                  may vary in size and function. They are
                  referred as sites, nodes, computers, and so
                  on.
                                                              20
Advantages and
Disadvantage
Advantages                                   Disadvantages
• Failure of one will not affect the other
  network communication, as all systems
                                             • Failure of the main network will
  are independent from each other              stop the entire communication
• Electronic mail increases the data         • To establish distributed systems
  exchange speed                               the language which are used
• Since resources are being shared,
  computation is highly fast and durable
                                               are not well defined yet
• Load on host computer reduces              • These types of systems are not
• These systems are easily scalable as         readily available as they are
  many systems can be easily added to the      very expensive. Not only that
  network                                      the underlying software is highly
• Delay in data processing reduces             complex and not understood
                                               well yet
                                                                               21
Network Operating System
                  These systems run on a server and
                    provide the capability to manage data,
                    users, groups, security, applications,
                    and other networking functions.
                  • These type of operating systems allow
                    shared access of files, printers,
                    security, applications, and other
                    networking functions over a small
                    private network.
                  • These computers are popularly known
                    as tightly coupled systems.
                                                    22
Advantages and
Disadvantage
Advantages                            Disadvantages
• Highly stable centralized           • Servers are costly
  servers
                                      • User has to depend on
• Security concerns are handled
  through servers                       central location for most
                                        operations
• New technologies and hardware
  up-gradation are easily             • Maintenance and updates are
  integrated to the system              required regularly
• Server access are possible
  remotely from different locations
  and types of systems
                                                                    23
    Real-Time Operating System
• These types of OSs serves the real-time systems. The time interval required to process and
  respond to inputs is very small. This time interval is called response time.
• In a RTOS, Processing time requirement are calculated in tenths of seconds increments of
  time. It is time-bound system that can be defined as fixed time constraints.
• Real-time systems are used when there are time requirements are very strict like missile
  systems, air traffic control systems, robots etc.
                                                                                               24
Advantages and
Disadvantage
Advantage                                                    Disadvantages
•s Maximum Consumption: Maximum utilization of               • Limited Tasks: Very few tasks run at the
   devices and system, thus more output from all the           same time and their concentration is very less
  resources                                                    on few applications to avoid errors.
• Task Shifting: Time assigned for shifting tasks in these
  systems are very less. For example in older systems it     • Use heavy system resources: Sometimes
  takes about 10 micro seconds in shifting one task to         the system resources are not so good and they
  another and in latest systems it takes 3 micro seconds.      are expensive as well.
• Focus on Application: Focus on running applications        • Complex Algorithms: The algorithms are very
  and less importance to applications which are in queue.
• Real time operating system in embedded                       complex and difficult for the designer to write
  system: Since size of programs are small, RTOS can
  also be used in embedded systems like in transport and       on.
  others.
• Error Free: These types of systems are error free.         • Device driver and interrupt signals: It needs
• Memory Allocation: Memory allocation is best                 specific device drivers and interrupt signals to
  managed in these type of systems.
                                                               response earliest to interrupts.
                                                             • Thread Priority: It is not good to set thread
                                                               priority as these systems are very less prone
                                                               to switching tasks.                              25
Mobile OS
• A mobile operating system, also called a mobile OS, is an
  operating system that is specifically designed to run on mobile
  devices such as mobile phones, smartphones, PDAs, tablet
  computers and other handheld devices
                                                               26
Types of Mobile OS
• Android OS (Google Inc.)
• Bada (Samsung Electronics)
• BlackBerry OS (Research In Motion)
• iPhone OS / iOS (Apple)
• MeeGo OS (Nokia and Intel)
• Palm OS (Garnet OS)
• Symbian OS (Nokia)
                                       27
    Operating System Operations
•   Operating Systems are interrupt driven. The interrupt is a signal emitted by hardware
    or software when a process or an event needs immediate attention. It alerts the
    processor to a high-priority process requiring interruption of the current working
    process.
                                                                                  28
Interrupts:
● Software Interrupts: A sort of interrupt called a software interrupt is one that is
  produced by software or a system as opposed to hardware. Traps and exceptions are
  other names for software interruptions. They serve as a signal for the operating
  system or a system service to carry out a certain function or respond to an error
  condition.
● Hardware Interrupts: A hardware interrupt is a condition related to the state of the
  hardware that may be signaled by an external hardware device, e.g., an interrupt
  request (IRQ) line on a PC, or detected by devices embedded in processor logic to
  communicate that the device needs attention from the operating system. For example,
  pressing a keyboard key or moving a mouse triggers hardware interrupts that cause
  the processor to read the keystroke or mouse position.
Computing Environments
Traditional Computing - In traditional computing the user can use a
traditional method like static memory allocation and it is mainly useful in single user
operating systems.
In this technique there will be a particular operating system that is going to perform all tasks
to that particular computer system.
It is like one task is performed by the CPU at a given time and the CPU utilizes the memory
that is used only for one task.
Client-Server Computing - In client-server computing there is a
technology available by using a client and server that are connected with each other with
the help of a network. When some process or program transfers from client to server or
server to client then the memory and I/O calculations is called client-server computing.
Basically in the internet the user can use this technology and a network is used to connect
the server with the client. So, that the client and server are connected with each other for
client-server computing.
                                                                                                   35
Computing Environments
Peer-to-Peer Computing - In Peer to Peer computing a node first joins the
network and a number of nodes are directly connected to the network, so every single node
has a direct connection with all the other nodes and this type of computing is called Peer to
Peer computing.
The Peer to Peer network is a network which is based on specific tasks and it is a centralized
service where one single node will be connected to all the other nodes just like our
computer where CPU is connected to all resources to perform operation.
Cloud computing
Cloud computing is a type of computing which delivers computing storage and services
across the network.
All the data is stored in cloud computing because it can be used by different servers to store
their data and use whenever they want.
In cloud computing different types of servers are used and storage manager is used to
manage the computing and there will be cloud management service through which
different companies are directly connected with it and store their data.
                                                                                                 36