0% found this document useful (0 votes)
12 views77 pages

Null

The document provides an overview of software and hardware concepts, detailing types of software including system, utility, and application software. It explains the role of operating systems in managing hardware resources and facilitating user interactions, while also outlining the history and evolution of operating systems through various generations. Additionally, it covers different types of operating systems, their services, and system calls, emphasizing the importance of resource management, security, and user interfaces.

Uploaded by

Ashish Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views77 pages

Null

The document provides an overview of software and hardware concepts, detailing types of software including system, utility, and application software. It explains the role of operating systems in managing hardware resources and facilitating user interactions, while also outlining the history and evolution of operating systems through various generations. Additionally, it covers different types of operating systems, their services, and system calls, emphasizing the importance of resource management, security, and user interfaces.

Uploaded by

Ashish Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 77

CHAPTER 1

INTRODUCTION
Syllabus
Basic concepts

Software:-
• Program is a collection of code/instruction.
• Software is a collection of program.

Hardware:-
• Physical device is a collection of computer system which
is called Hardware.
• For example:-processor, RAM,HD,I/O devices.
Types of Software:

Software is divide into three types:


 System software
 Utility software
 Application software
System software
The software which is used to perform all types of system
level work of the computer system is called system
software.

For example:
• Compiler
• Operating system
• Interpreter
• Linker
• Loader
Utility Software
The software, which provide an additional meaning to
the computer system.

For Example:-
• Calculator
• MS-paint
Application Software
The software which is created by users, using the
different high level language and database system for
any special purpose.

For Example:-

• Library Management

• Banking Software
What
is an
Operating
System?
Definition

1. An operating system (OS) is a collection of system


software that manages computer hardware resources
and provides common services for computer
programs.

2. A program that acts as an intermediary/interface


between a user of a computer and the computer
hardware.
Operating System

Users and Processes


access the Computer’s
resources through the
Operating System
Goals of an Operating System

• Simplify the execution of user programs and make


solving user problems easier
• Use computer hardware efficiently
 Allow sharing of hardware and software resources.
• Make application software portable and versatile
• Provide isolation, security and protection among user
programs
• Improve overall system reliability
 error confinement, fault tolerance, reconfiguration.

11
History/Generations of Operating
Systems
The First Generation ( 1945 - 1955 ): Vacuum Tubes and
Plugboards

• Digital computers were not constructed until the second


world war. Calculating engines with mechanical relays
were built at that time. However, the mechanical relays
were very slow and were later replaced with vacuum
tubes. These machines were enormous but were still
very slow.
• These early computers were designed, built and
maintained by a single group of people. Programming
languages were unknown and there were no operating
systems so all the programming was done in machine
language. All the problems were simple numerical
calculations.
• By the 1950’s punch cards were introduced and this
improved the computer system. Instead of using
plugboards, programs were written on cards and read
into the system.
The Second Generation ( 1955 - 1965 ): Transistors and
Batch Systems

• Transistors led to the development of the computer


systems that could be manufactured and sold to paying
customers. These machines were known as mainframes
and were locked in air-conditioned computer rooms with
staff to operate them.

• The Batch System was introduced to reduce the wasted


time in the computer. A tray full of jobs was collected in
the input room and read into the magnetic tape.
The Third Generation ( 1965 - 1980 ): Integrated Circuits and
Multiprogramming

• Until the 1960’s, there were two types of computer


systems i.e the scientific and the commercial
computers. These were combined by IBM in the
System/360. This used integrated circuits and provided
a major price and performance advantage over the
second generation systems.

• The third generation operating systems also introduced


multiprogramming. This meant that the processor was
not idle while a job was completing its I/O operation.
Another job was scheduled on the processor so that its
time would not be wasted.
The Fourth Generation ( 1980 - Present ): Personal
Computers

• Personal Computers were easy to create with the


development of large-scale integrated circuits. These
were chips containing thousands of transistors on a
square centimetre of silicon.

• The advent of personal computers also led to the


growth of networks. This created network operating
systems and distributed operating systems. The users
were aware of a network while using a network
operating system and could log in to remote machines
and copy files from one machine to another.
Each is a computer having its own
CPU, RAM, etc. An OS supporting
networks is installed on them.
Microsoft Windows

• Microsoft created the Windows operating system in the


mid-1980s.

• most recent versions are Windows 10 (released in


2015), Windows 8 (2012), Windows 7 (2009), and
Windows Vista (2007).

• Windows comes pre-loaded on most new PCs, which


helps to make it the most popular operating system in
the world.
Cont.
Mac OS X

• Mac OS is a line of operating systems created by Apple.

• It comes preloaded on all new Macintosh computers, or


Macs.

• Specific versions include El Capitan (released in 2015),


Yosemite (2014), Mavericks (2013), Mountain Lion
(2012), and Lion (2011).
Cont.

According to StatCounter Global Stats, Mac OS X users account for


less than 10% of global operating systems
Linux

• Linux (pronounced LINN-ux) is a family of open-source


operating systems, which means they can be modified
and distributed by anyone around the world.

• The advantages of Linux are that it is free, and there


are many different distributions or versions you can
choose from.
linux
Operating systems for mobile devices

• Mobile devices such as phones, tablet computers, and


MP3 players are different from desktop and laptop
computers, so they run operating systems that are
designed specifically for mobile devices.

• Examples of mobile operating systems include Apple


iOS and Google Android.
Types of Operating Systems

1. Simple Batch System


2. Multiprogramming Batch System
3. Multitasking system
4. Multiprocessor System
5. Distributed Operating System
6. Real-time Operating System
SIMPLE BATCH SYSTEMS

• No direct interaction between user and computer.

• The user has to submit a job (written on cards or tape)


to a computer operator.

• Then computer operator places a batch of several jobs


on an input device.
Cont.

• Jobs are batched together by type of languages and


requirement.

• Then a special program, the monitor, manages the


execution of each program in the batch.

• The monitor is always in the main memory and


available for execution.
Cont.
Cont.
• Advantages
 Increased performance since it was possible for job
to start as soon as the previous job finished.
 Batched operating systems are appropriate for
executing large jobs that need little interaction
• Disadvantages
 Zero interaction between user and computer.
 No mechanism to prioritize processes.
Multiprogramming Batch Operating
System
• Several jobs are kept in main memory at the same time,
and the CPU is multiplexed among them.
Cont.

• Multiprogramming increases CPU utilization

• Multiple jobs are loaded into main memory and one is selected
from pool for execution by CPU

• If at some point program in progress requires service of a


peripheral device, the control of CPU is given to next job which
is in main memory

• In this way CPU is always executing some program instead of


waiting.
Cont.
• CPU usage is poor when only one program is present in
memory

• If memory can hold several programs, then CPU can


switch to another one whenever a program is awaiting
for an I/O to complete This is multitasking
(multiprogramming)
Advantages of Multiprogramming
Uniprogramming Multiprogramming
• Processor use 17%
33%
• Memory use 33%
67%
• Disk use 33% 67%
• Printer use 33% 67%
• Elapsed time 30 min.
15 min.
• Throughput rate 6 jobs/hr 12 jobs/hr
Cont.

• Advantages
1. CPU is never idle, if there are jobs available. So, High CPU
utilization.
2. It appears that many programs are allotted CPU almost
simultaneously.
3. Provides better resource utilization (Memory, I/O, CPU)
4. User can execute more then one process simultaneously.

• Disadvantages
1. CPU scheduling is required.
2. To accommodate many jobs in memory, memory
management is required.
Multitasking/Time Sharing
System(TSS)
• Multiprogramming does not support interaction with
users
• TSS extends multiprogramming to handle multiple
interactive jobs
• TSS uses CPU scheduling & multiprogramming to
provide economical interactive systems of two or more
users.
• Each user is given a time-slice for executing his job in
Round-Robin Fashion ( Every process will be given equal
amount of CPU one by one in sequence). Job continues
until the time slice ends.
Cont.

• TSS allows more frequent context switches from one


user to the next (when time-slice of particular process
ends it switches to the next for given time slice
duration)
• This gives each user the impression that the entire
computer is dedicated to his use only, whereas actually
one computer is being shared among many users.
Cont.

• Advantages:
1. Provides Quick Response
2. Reduces CPU idle time much more

• Disadvantages:
1. Security & Integrity of user’s program & data is
needed.
2. If lots of users & applications are running then it may
hang up the system. So, high specification of hardware
is needed to over come this problem.
38
Multiprocessor/Parallel System.

• Multiprocessor systems with more than one CPU in


close communication.
• Tightly coupled system – processors share memory
and I/O devices, bus, system and communication
usually takes place through the shared memory.

39
Cont.

• A multiprocessor system consists of several processors


that share a common physical memory.

• Multiprocessor system provides higher computing


power and speed.

• In multiprocessor system all processors operate under


single operating system.
Cont.
Advantages of parallel system:
 Increased throughput: No. of jobs executed per
unit time increased as there are more no. of
processors .
 Economical: Buying one system with 3 CPU is
cheaper than 3 systems with 3 different CPUs. The
processors can share peripherals, cabinets and
power supplies.
 Increased reliability: The failure of one processor
will not halt the system, if functions can be
distributed properly among several available 41
Real Time System
• A real-time operating system (RTOS) is an operating
system that promises a certain capability within a
specified time constraint.

• It is defined as an operating system known to give


maximum time for each of the critical operations that it
performs, like OS calls and interrupt handling.

42
Cont.

Hard real-time system:


• The Real-Time Operating system which guarantees the
maximum time for critical operations and complete
them on time are referred to as Hard Real-Time
Operating Systems.
• If the system fails to meet the deadline even once the
system is considered to have Failed.

E.g. Defense applications, nuclear system etc. Missing


deadlines creates hazards.
Cont.

Soft real-time system:


• The critical task will get priority over other tasks, but no
assurity of completing it in a defined time. These
systems are referred to as Soft Real-Time Operating
Systems.
• It is less restrictive type of OS. even if the system fails
to meet the deadline, the system is not considered to
have failed. In this case the results of the requests are
not worthless.
e.g. audio-video streaming etc.
Distributed System

• Distribute the computation among several physical


processors.
• Distributed OS is an OS that runs on several machines
and it controls the resources of several machines.
• Loosely coupled system – each processor has its own
local memory; processors communicate with one
another through various communications lines, such as
high-speed buses or telephone lines.

45
Cont.

• Advantages of distributed systems.


 Resources Sharing
 Computation speed up – load sharing . So, Short
response time and higher throughput.
 Higher Reliability: Degree of tolerance against
failure
 Incremental Growth : to extend functionality of a
system by simply adding additional resources to the
system
47
Operating System Services
Operating System Services
• User Interface: Almost all operating systems have a
user interface (UI). Varies between Command-Line
(CLI), Graphics User Interface (GUI), Batch
Interfaces

• Program execution: The system must be able to load


a program into memory and to run that program, must
be able to end execution, either normally or abnormally
(indicating error)

• I/O operations – A running program may require I/O,


which may involve a file or an I/O device, since user
Operating System Services

• File-system manipulation – Programs need to read


and write files and directories, create and delete them,
search them, list file Information, permission
management; allow or deny access to files/directories
based on file ownership.

• Communications – Exchange of information between


processes executing either on the same computer or on
different systems tied together by a network.
Implemented via shared memory or message passing.
Operating System Services

• Error detection – OS needs to be constantly aware of


possible errors
 May occur in the CPU and memory hardware, in I/O devices,
in user program
 For each type of error, OS should take the appropriate action
to ensure correct and consistent computing
 Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
Some Additional OS Services

• Resource allocation - When multiple users or


multiple jobs running concurrently, resources must be
allocated to each of them. Many types of resources -
Some (such as CPU cycles, main memory, and file
storage) may have special allocation code, others
(such as I/O devices) may have general request and
release code.
• Accounting - To keep track of which users use how
much and what kinds of computer resources. Used for
accounting or usage statistics.
• Protection and security - The owners of information 52
Some Additional OS Services

• Protection involves ensuring that all access to system


resources is controlled
• Security of the system from outsiders requires user
authentication (by password), extends to defending
external I/O devices (eg. Modems, network adapter from
invalid access attempts .

53
System Calls
Kernel Mode
• When CPU is in kernel mode, the code being
executed can access any memory address and any hardware
resource.
• Hence kernel mode is a very privileged and powerful mode.
• If a program crashes in kernel mode, the entire system will be
halted.
User Mode
• When CPU is in user mode, the programs don't have direct
access to memory and hardware resources.
• In user mode, if any program crashes, only that particular
program is halted. That means the system will be in a safe state
System Calls
• System call is a request made by user program in order
to get the service of an operating system.

• When a program in user mode requires access to RAM


or a hardware resource, it must ask the kernel to
provide access to that resource. This is done via
something called a system call.
Some System Calls For Process
Management

56
Some System Calls For File
Management

57
Some System Calls For Directory
Management

58
Some System Calls For
Miscellaneous Tasks

59
Operating System layered structure
 With the layered approach,
the bottom layer is the
hardware, while the highest
layer is the user interface.
 The main advantage is
simplicity of construction
and debugging.
 The main difficulty is
defining the various layers.
 The main disadvantage is
that the OS tends to be
less efficient than other
implementations
Operating System Structure -
Components
• Process Management
• Main Memory Management
• File Management
• I/O System Management
• Secondary Management
• Networking
• Protection System
• Command-Interpreter System

62
Process Management

• A process is a program in execution. A process needs


certain resources, including CPU time, memory, files,
and I/O devices, to accomplish its task.
• The operating system is responsible for the following
activities in connection with process management.
 Process creation and deletion.
 process suspension and resumption.
 Deadlock handling
 Provision of mechanisms for:
 process synchronization
 process communication
Memory Management

• Memory is a large array of words or bytes, each with its


own address. It is a repository of quickly accessible
data shared by the CPU and I/O devices.
• Main memory is a volatile storage device. It loses its
contents in the case of system failure.
• The operating system is responsible for the following
activities in connections with memory management:
 Keep track of which parts of memory are currently being
used and by whom.
 Decide which processes to load when memory space
becomes available.
 Allocate and deallocate memory space as needed.
File Management
• A file is a collection of related information defined by
its creator. Commonly, files represent programs (both
source and object forms) and data.
• The operating system is responsible for the following
activities in connections with file management:
 File creation and deletion.
 Directory creation and deletion.
 Support of primitives for manipulating files and directories.
 Mapping files onto secondary storage.
 File backup on stable (nonvolatile) storage media.

65
I/O System Management

• The I/O system consists of:


 A buffer-caching system
 A general device-driver interface
 Drivers for specific hardware devices

66
Secondary-Storage Management

• Since main memory (primary storage) is volatile and too


small to accommodate all data and programs
permanently, the computer system must provide
secondary storage to back up main memory.
• Most modern computer systems use disks as the
principle on-line storage medium, for both programs
and data.
• The operating system is responsible for the following
activities in connection with disk management:
 Free space management
 Storage allocation
 Disk scheduling 67
Networking

• A distributed system is a collection processors that do


not share memory or a clock. Each processor has its
own local memory.
• The processors in the system are connected through a
communication network.
• Communication takes place using a protocol.
• A distributed system provides user access to various
system resources.
• Access to a shared resource allows:
 Computation speed-up
 Increased data availability 68
Protection

• Protection refers to a mechanism for controlling access


by programs, processes, or users to both system and
user resources.
• The protection mechanism must:
 distinguish between authorized and unauthorized usage.
 specify the controls to be imposed.
 provide a means of enforcement.

69
Command-Interpreter System

• The program that reads and interprets control statements


is called variously:
 command-line interpreter
 shell (in UNIX)
Its function is to get and execute the next command
statement.
Monolithic Approach
• Functionality of the OS is invoked with simple function
calls within the kernel, which is one large program.
• Device drivers are loaded into the running kernel and
become part of the kernel.
Microkernel Approach
This structures the operating system by removing all
nonessential portions of the kernel and implementing
them as system and user level programs.
 Generally they provide minimal process and memory
management, and a communications facility.
 Communication between components of the OS is
provided by message passing.
The benefits of the microkernel are as follows:
Extending the operating system becomes much easier.
Any changes to the kernel tend to be fewer, since the
kernel is smaller.
The microkernel also provides more security and
reliability.

Main disadvantage is poor performance due to


increased system overhead from message passing.
Concept of Virtual Machine

• The fundamental idea behind a virtual machine is to


abstract the hardware of a single computer (the CPU,
Memory, Disk drives, Network Interface Cards, and so
forth) into several different execution environments and
thereby creating the illusion that each separate
execution environment is running its own private
computer.

• A virtual machine, usually known as a guest is created


within another computing environment referred as a
"host." Multiple virtual machines can exist within a
single host at one time.
Advantages
Allows multiple operating system environments on a single
physical computer without any intervention.
Virtual machines are widely available and are easy to manage
and maintain.
Offers application provisioning and disaster recovery options

Disadvantages
They are not as efficient as a physical computer because the
hardware resources are distributed in an indirect way.
Multiple VMs running on a single physical machine can deliver
unstable performance

You might also like