Upload
khangminh22
View
2
Download
0
Embed Size (px)
Citation preview
OPERATING SYSTEMS
Dr.M.Kavitha
Assistant Professor
PG&Research Department of Commerce
Guru Nanak College, Chennai-42
What Is An Operating System?
An operating system in its most general
definition is the software that allows a
user to run crucial applications on his/her
computing device. It helps to manage a
computer’s hardware resources. It helps to
support basic functions like scheduling
tasks, and controlling peripherals.
DEFINITION OF OPERATION
SYSTEM
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.
HISTORY
Early computers were built to perform a series of
single tasks, like a calculator. Basic operating
system features were developed in the 1950s,
such as resident monitor functions that could
automatically run different programs in
succession to speed up processing. Operating
systems did not exist in their modern and more
complex forms until the early 1960s
The first microcomputers did not have the
capacity or need for the elaborate operating
systems that had been developed for mainframes
and minis; minimalistic operating systems were
developed, often loaded from ROM and known
as monitors.
TYPES OF OPERATING SYSTEM
TYPES OF OS
Distributed Templated Real-time
Single- & multi-
user
Library
Single-tasking &
multi-tasking
COMPONENTS OF OPERATING
SYSTEM
KERNEL
With the aid of the firmware and device drivers, the kernel provides the most basic level of control over all of the computer's hardware devices.
PROGRAM EXECUTION
The operating system provides an interface between an application program and the computer hardware, so that an application program can interact with the hardware only by obeying rules and procedures programmed into the operating system.
INTERRUPTS
Interrupts are central to operating
systems, as they provide an efficient way
for the operating system to interact with
and react to its environment. The
alternative – having the operating system
"watch" the various sources of input for
events (polling) that require action – can
be found in older systems with very
small stacks (50 or 60 bytes) but is
unusual in modern systems with large
stacks.
MODES
In general terms, supervisor mode
operation allows unrestricted access to all
machine resources, including all MPU
instructions. User mode operation sets
limits on instruction use and typically
disallows direct access to machine
resources.
MEMORY MANAGEMENT
Among other things, a multiprogramming
operating system kernel must be responsible for
managing all system memory which is currently
in use by programs. This ensures that a program
does not interfere with memory already in use by
another program. Since programs time share,
each program must have independent access to
memory.
VIRTUAL MEMORY
The use of virtual memory addressing (such as
paging or segmentation) means that the kernel
can choose what memory each program may use
at any given time, allowing the operating system
to use the same memory locations for multiple
tasks
DEVICE DRIVERS
A device driver is a specific type of computer
software developed to allow interaction with
hardware devices. Typically this constitutes an
interface for communicating with the device,
through the specific computer bus or
communications subsystem that the hardware is
connected to, providing commands to and/or
receiving data from the device, and on the other
end, the requisite interfaces to the operating
system and software applications.
DISK ACCESS AND FILE SYSTEMS
Access to data stored on disks is a central feature
of all operating systems. Computers store data
on disks using files, which are structured in
specific ways in order to allow for faster access,
higher reliability, and to make better use of the
drive's available space
FUNCTIONS OF OPERATING
SYSTEM
Security –The operating system uses password protection to protect user data and similar other techniques. it also prevents unauthorized access to programs and user data.
Control over system performance –Monitors overall system health to help improve performance. records the response time between service requests and system response to have a complete view of the system health. This can help improve performance by providing important information needed to troubleshoot problems.
Job accounting –Operating system Keeps track of time and resources used by various tasks and users, this information can be used to track resource usage for a particular user or group of user.
Error detecting aids –Operating system constantly monitors the system to detect errors and avoid the malfunctioning of computer system.
Coordination between other software and users –Operating systems also coordinate and assign interpreters, compilers, assemblers and other software to the various users of the computer systems
Memory Management –
The operating system manages the Primary
Memory or Main Memory. Main memory is made
up of a large array of bytes or words where each
byte or word is assigned a certain address. Main
memory is a fast storage and it can be accessed
directly by the CPU. For a program to be
executed, it should be first loaded in the main
memory.
Processor Management –
In a multi programming environment, the OS
decides the order in which processes have access
to the processor, and how much processing time
each process has. This function of OS is called
process scheduling. An Operating System
performs the following activities for processor
management.Keeps tracks of the status of
processes.
Device Management –
An OS manages device communication via their
respective drivers. It performs the following
activities for device management. Keeps tracks of
all devices connected to system. designates a
program responsible for every device known as
the Input/Output controller. Decides which
process gets access to a certain device and for
how long. Allocates devices in an effective and
efficient way. Deallocates devices when they are
no longer required.
File Management –
A file system is organized into directories for
efficient or easy navigation and usage. These
directories may contain other directories and
other files.
ADVANTAGES OF OS
Allocating memory is easy and cheap
Any free page is ok, OS can take first one out of list it keeps
Eliminates external fragmentation
Data (page frames) can be scattered all over PM
Pages are mapped appropriately anyway
Allows demand paging and prepagingMoreefficient swapping
No need for considerations about fragmentation
Just swap out page least likely to be used
DISADVANTAGES
Longer memory access times (page table lookup)
Can be improved using TLB
Guarded page tables
Inverted page tables
Memory requirements (one entry per VM page)
Improve using Multilevel page tables and variable page sizes (super-pages)Guarded page tables
Page Table Length Register (PTLR) to limit virtual memory size
Internal fragmentation