0% found this document useful (0 votes)
20 views34 pages

Osy2 Basic

The document provides an overview of operating systems. It discusses that an operating system controls and coordinates the use of computer hardware and resources among various programs and users. It acts as a manager that allocates resources like CPU time, memory, and I/O devices. The key components of an operating system are process management, memory management, secondary storage management, I/O management, file management, and protection.

Uploaded by

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

Osy2 Basic

The document provides an overview of operating systems. It discusses that an operating system controls and coordinates the use of computer hardware and resources among various programs and users. It acts as a manager that allocates resources like CPU time, memory, and I/O devices. The key components of an operating system are process management, memory management, secondary storage management, I/O management, file management, and protection.

Uploaded by

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

Operating System

By
Mr. Parag R. Sali
Lecturer
Department of Computer Technology
SNJB’s Shri. Hiralal Hastimal ( Jain Brothers)
Polytechnic, Chandwad
Program Name: Computer Engineering Group
Program Code : CO/CM/IF/CW
Semester : Fifth
Course Title : Operating System
Course Code : 22516

Overview of Operating System


WHAT IS AN OPERATING SYSTEM?

In a computer system, we find four main components:


the hardware, the operating system, the application
software and the users.
In a computer system the hardware provides the basic
computing resources.
The applications programs define the way in which these
resources are used to solve the computing problems of
the users.
The operating system controls and coordinates the use
of the hardware among the various systems programs
and application programs for the various users.
Component of Computer System
WHAT IS AN OPERATING SYSTEM?
We can view an operating system as a resource allocator. A
computer system has many resources (hardware and
software) that may be required to solve a problem: CPU
time, memory space, files storage space, input/output
devices etc.
The operating system acts as the manager of these
resources and allocates them to specific programs and
users as necessary for their tasks. Since there may be many,
possibly conflicting, requests for resources, the operating
system must decide which requests are allocated resources
to operate the computer system fairly and efficiently.
WHAT IS AN OPERATING SYSTEM?
An operating system is a control program. This program
controls the execution of user programs to prevent errors
and improper use of the computer. The fundamental goal
of a computer system is to execute user programs and solve
user problems.
WHAT IS AN OPERATING SYSTEM?
A computer’s operating system is a group of programs
designed to serve two basic
purposes:
1. To control the allocation and use of the computing
system’s resources among the various users and tasks,
and
2. To provide an interface between the computer
hardware and the programmer that simplifies and
makes feasible the creation, coding, debugging, and
maintenance of application programs.
Computer System Operation
For a computer to start running—for instance, when it is powered
up or rebooted—it needs to have an initial program to run. This
initial program, or bootstrap program, tends to be simple. Typically,
it is stored within the computer hardware in read-only memory
(ROM) or electrically erasable programmable read-only memory
(EEPROM), known by the general term firmware. It initializes all
aspects of the system, from CPU registers to device controllers to
memory contents. The bootstrap program must know how to load
the operating system and how to start executing that system.
Computer System Operation
Computer System Operation
To accomplish this goal, the bootstrap program must locate the
operating-system kernel and load it into memory.
Once the kernel is loaded and executing, it can start providing
services to the system and its users. Some services are
provided outside of the kernel, by system programs that are
loaded into memory at boot time to become system
processes, or system daemons that run the entire time the
kernel is running.
Computer System Operation
The occurrence of an event is usually signaled by an
interrupt from either the hardware or the software.
Hardware may trigger an interrupt at any time by sending a
signal to the CPU, usually by way of the system bus. Software
may trigger an interrupt by executing a special operation
called a system call (also called a monitor call).
Storage Structure
The CPU can load instructions only from memory, so any programs to run
must be stored there. General-purpose computers run most of their
programs from rewritable memory, called main memory (also called
random-access memory, or RAM). Main memory commonly is
implemented in a semiconductor technology called dynamic random-
access memory (DRAM). Because ROM cannot be changed, only static
programs, such as the bootstrap program described earlier, are stored
there. The immutability of ROM is of use in game cartridges. EEPROM can
be changed but cannot be changed frequently and so contains mostly
static programs. For example, smartphones have EEPROM to store their
factory-installed programs.
Storage Structure
Ideally, we want the programs and data to reside in main
memory permanently. This arrangement usually is not possible
for the following two reasons:
1. Main memory is usually too small to store all needed
programs and data permanently.
2. Main memory is a volatile storage device that loses its
contents when power is turned off or otherwise lost.
Thus, most computer systems provide secondary storage as an
extension of main memory.
Storage Structure

The main requirement for secondary storage is that it be able to


hold large quantities of data permanently.
The most common secondary-storage device is a magnetic disk,
which provides storage for both programs and data. Most
programs (system and application) are stored on a disk until they
are loaded into memory. Many programs then use the disk as both
the source and the destination of their processing. Hence, the
proper management of disk storage is of central importance to a
computer system, we will discuss these in unit 6.
Storage-device hierarchy
Component of O.S.
The components of an operating system are as follows:
1. Process Management
2. Memory Management
3. Secondary Storage Management
4. I/O Management
5. File Management
6. Protection
7. Networking Management
8. Command Interpretation.
1. Process Management

The CPU executes a large number of programs. While its main


concern is the execution of user programs, the CPU is also needed
for other system activities. These activities are called processes. A
process is a program in execution. Typically, a batch
job is a process. A time-shared user program is a process. A
system task, such as spooling, is also a process. For now, a process
may be considered as a job or a time- shared program, but the
concept is actually more general.
1. Process Management Cont….

The operating system is responsible for the following activities in


connection with processes management:
1. The creation and deletion of both user and system processes
2. The suspension and resumption of processes.
3. The provision of mechanisms for process synchronization
4. The provision of mechanisms for process communication
5. The provision of mechanisms for deadlock handling.

Process management techniques will be discussed in detail in


Unit-3 of this course.
2. Memory Management
Memory is the most expensive part in the computer system.
Memory is a large array of words or bytes, each with its own
address. Interaction is achieved through a sequence of reads or
writes of specific memory address. The CPU fetches from and
stores in memory.
There are various algorithms that depend on the particular
situation to manage the memory. Selection of a memory
management scheme for a specific system depends upon many
factors, but especially upon the hardware design of the system.
Each algorithm requires its own hardware support.
2. Memory Management Cont…

The operating system is responsible for the following activities


in connection with memory management.
1. Keep track of which parts of memory are currently being
used and by whom.
2. Decide which processes are to be loaded into memory
when memory space becomes available.
3. Allocate and deallocate memory space as needed

Memory management techniques will be discussed in detail in


Unit-4 of this course.
3. Secondary Storage Management
The main purpose of a computer system is to execute programs.
These programs, together with the data they access, must be in
main memory during execution. Since the main memory is too small
to permanently accommodate all data and program, the computer
system must provide secondary storage to backup main memory.
Most modem computer systems use disks as the primary on-line
storage of information, of both programs and data. Most programs,
like compilers, assemblers, sort routines, editors, formatters, and so
on, are stored on the disk until loaded into memory, and then use
the disk as both the source and destination of their processing.
3. Secondary Storage Management Cont..

Hence the proper management of disk storage is of central


importance to a computer system. There are few alternatives.
Magnetic tape systems are generally too slow. In addition, they
are limited to sequential access. Thus tapes are more suited for
storing infrequently used files, where speed is not a primary
concern.
The operating system is responsible for the following activities
in connection with disk management:
1. Free space management
2. Storage allocation
3. Disk scheduling.
4. I/O Management
One of the purposes of an operating system is to hide the
peculiarities or specific hardware devices from the user. For
example, in UNIX, the peculiarities of I/O devices are hidden
from the bulk of the operating system itself by the I/O system.
The operating system is responsible for the following activities
in connection to I/O management:
1. A buffer caching system
2. To activate a general device driver code
3. To run the driver software for specific hardware devices as
and when required.
5. File Management
File management is one of the most visible services of an
operating system. Computers can store information in several
different physical forms: magnetic tape, disk, and drum are the
most common forms. Each of these devices has it own
characteristics and physical organization.
For convenient use of the computer system, the operating
system provides a uniform logical view of information storage.
The operating system abstracts from the physical properties of
its storage devices to define a logical storage unit, the file. Files
are mapped, by the operating system, onto physical devices.
File Management Cont..

A file is a collection of related information defined by its creator.


Commonly, files represent programs (both source and object
forms) and data. Data files may be numeric, alphabetic or
alphanumeric. Files may be free-form, such as text files, or may
be rigidly formatted. In general a files is a sequence of bits,
bytes, lines or records whose meaning is defined by its creator
and user. It is a very general concept.
File Management Cont..

The operating system implements the abstract concept of the


file by managing mass storage device, such as types and disks.
Also files are normally organized into directories to ease their
use. Finally, when multiple users have access to files, it may
be desirable to control by whom and in what ways files may be
accessed.
File Management Cont..

The operating system is responsible for the following activities in


connection to the file management:
1. The creation and deletion of files.
2. The creation and deletion of directory.
3. The support of primitives for manipulating files and
directories.
4. The mapping of files onto disk storage.
5. Backup of files on stable (non volatile) storage.
6. Protection and security of the files.
6. Protection

Considering a computer system having multiple users and


concurrent execution of multiple processes, the various
processes must be protected from each other's activities.
Protection refers to a mechanism or a way to control the access
of programs, processes, or users to the resources defined by a
computer system.
6. Protection Cont..

Following are the major activities of an operating system with


respect to protection:
1. The OS ensures that all access to system resources is
controlled.
2. The OS ensures that external I/O devices are protected from
invalid access attempts.
3. The OS provides authentication features for each user by
means of passwords.
7. Networking
A distributed system is a collection of processors that do not
share memory or a clock.
Instead, each processor has its own local memory, and the
processors communicate with each other through various
communication lines, such as high speed buses or telephone
lines. Distributed systems vary in size and function. They may
involve microprocessors, workstations, minicomputers, and
large general purpose computer systems.
The processors in the system are connected through a
communication network, which can be configured in the
number of different ways.
7. Networking Cont..

The network may be fully or partially connected. The


communication network design must consider routing and
connection strategies and the problems of connection and
security.
A distributed system provides the user with access to the
various resources the system maintains. Access to a shared
resource allows computation speed-up, data availability, and
reliability.
8.Command Interpretation
One of the most important components of an operating system
is its command interpreter. The command interpreter is the
primary interface between the user and the rest of the system.
Many commands are given to the operating system by control
statements. When a new job is started in a batch system or
when a user logs-in to a time-shared system, a program which
reads and interprets control statements is automatically
executed. This program is variously called (1) the control card
interpreter, (2) the command line interpreter, (3) the shell (in
Unix), and so on. Its function is quite simple: get the next
command statement, and execute it.
The command statements themselves deal with process
management, I/O handling, secondary storage
management, main memory management, file system
access, protection, and networking.
1.2 Types of Operating System

1. Batch Operating System


2. Multi Programmed
3. Time Shared OS (Multi Tasking OS)
4. Multiprocessor Systems

You might also like