Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
23 views10 pages

SS &OS Notes Unit 3.1

System Speification and Operating System notes for Bsc Computer Science 5th semester students
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)
23 views10 pages

SS &OS Notes Unit 3.1

System Speification and Operating System notes for Bsc Computer Science 5th semester students
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/ 10

CS5CRT14: System Software and Operating Systems (Core)

Unit 3.1 : OPERATING SYSTEMS

Definition
​ The operating system is a software that manages the computer
hardware. It is an interface between a computer user and computer hardware.
It controls and coordinates the use of the hardware among the various
application programs for the various users.

Some popular OS are Linux, Microsoft Windows (10, 8, 7, XP), Unix, MS DOS,
MacOS (Apple), Chrome OS, BlackBerry Tablet OS, etc.

The two main functions of the operating system are


(1) Provide a good interface to the user for working with the hardware and
(2) Effective and efficient management of the resources.

Computer System Structure:

Computer system can be divided into four components


1. Hardware – provides basic computing resources (CPU, memory, I/O
devices)
2. Operating system - Controls and coordinates use of hardware among
various applications and users
3. Application programs – solves the computing problems of the users using
system resources through OS. Eg: Word processors, compilers, web
browsers, database systems, video games
4. Users - People, machines, other computers

Types of OS ( Evolution of OS)


1. Batch Processing Systems:
​ ​ In early computers, the major task was to transfer control
automatically from one job to the next. To speed up the processing, jobs with
similar needs are batched together and run as a group. Programmers will leave
their programs with the operator. The operator would sort programs of similar
requirements. The output of each job would be sent back to the appropriate
programmer.

Disadvantage : (1) Lack of interaction between the user and the jobs in
execution.
​ ​ (2) The CPU is often idle, because the mechanical I/O devices
are slower than electronic devices. This can be solved using the idea of
SPOOLing (Simultaneous Peripheral Operations Online. SPOOLing can keep
both CPU and I/O devices working at much higher rates.

OS

2.​ Multiprogramming Systems:


​ ​ If a computer can run several programs at the same time( using a
single processor), the processor could be kept busy for most of the time by
switching attention from one program to the next – multiprogramming.
​ In this the OS keeps several jobs in memory at a time. The OS starts with
executing one job in the memory. When this job goes for an I/O request, the OS
simply switches to the next job. When that job also goes for I/O, the OS switches
to the next and so on. Also when the first job comes back after waiting, it will get
the processor again. Thus I/O transfers could overlap with processor activity.
That is while one program has to wait for an I/O, then another program could
use the processor. Thus multiprogramming increases the CPU utilization.
However, this system needs job scheduling.
Advantages :
​ -- efficient utilisation of memory
​ -- efficient utilisation of CPU
​ -- increased throughput

OS
​ ​ ​

​ ​ ​ ​ Job1

​ ​ ​ ​ ​ Job 2​​

​ ​ ​ ​ ​ Job 3
​ ​ ​ ​ ​
​ ​ ​ ​ ​ Job 4

3. Time sharing systems (multi tasking)


​ It is a logical extension of multiprogramming. Multiple jobs are executed by
the CPU by switching between them, but the switches occur so frequently that
the users may interact with each program while running. A time shared OS uses
CPU scheduling and multi programming to provide each user with a small
portion of time shared computer. The CPU scheduler selects a job from the
READY queue and the CPU starts executing that job. But it can be executed
only for a particular time interval ( time slot). When the time slot expires, the
CPU switches to another job. The CPU time is shared between many
processes. So it is called time sharing systems.

Advantages :
​ -- user can interact with job while executing
​ -- efficient utilisation of CPU.

4.​ Multi user systems
​ ​ When referring to a computer operating system, a multi-user system
is a computer with an operating system that supports multiple users at once or
different times.
Multi-user is a term that defines an operating system or application software that
allows access by multiple users of a computer. Time-sharing systems are
multi-user systems. Most batch processing systems for mainframe computers
may also be considered "multi-user", to avoid leaving the CPU idle while it waits
for I/O operations to complete.

5.​ Online & Real time systems


There are systems that update automatically after a specified time and there are
systems where you need to refresh the page manually. There is some time lag
between the event that is happening and the time when the web page refreshes.
Online has just one meaning and that is when one is logged on to the internet.
Whether you are playing a game online, tracking movement of share prices, or
talking to your friend via instant messenger, you are effectively dealing with
online systems.

A real time system is used when there are tight time requirements on the
operation or the flow of data. Thus used as a control device in a dedicated
application. A real time system is considered to function correctly only if it
returns the correct results within time constraints. A real time system changes its
state as a function of physical time.
Eg: fire sensors, smoke sensors, space systems, air traffic control systems,
automated electronics etc.

​ Because of advancements in technology and increase in the number of


users, many online systems today are almost real time.

Operating System Functions:


( Why Operating System is a Resource Manager ? )
OS is a collection of programs designed to manage the system resources like
processor, memory, devices and files. So it is viewed as a resource manager.
The OS is viewed as a control program because it manages the execution of
user programs to Prevent errors & improper use of the computer.
(1) Process Management Functions :-
Process is a program in execution. (Program is a passive entity, process is
an active entity.) Process executes instructions sequentially, one at a time,
until completion. Process needs resources to accomplish its task. Process
termination requires reclaim of any reusable resources. The process
management component of the OS manages many processes that are
running simultaneously on the system.
The process management functions of OS are
●​ Creating and deleting processes (both user and system processes)
●​ Suspending and resuming processes
●​ Communication among processes.
●​ Process synchronization
●​ Deadlock handling

(2) Memory Management Functions :-


Main Memory offers fast storage that can be accessed directly by the CPU. It is
costly and hence has a lower storage capacity. However, for a program to be
executed, it must be in the main Memory.The OS must manage the allocation of
memory to processes and control the memory management hardware. The
memory contains all data before and after processing. The memory contains all
instructions to execute.
The Memory management functions are
●​ Allocating the memory when a process requests
●​ Deallocating memory space when a process has been terminated or no
longer requires it.
●​ Deciding which processes and data to move into and out of memory
●​ Keeping track of which parts of memory are currently being used and by
whom.

(3) File Management Functions :-


A file is a set of related information. It commonly represents programs, both
source and object forms, and data. The OS controls the manipulation of the files.
Files are usually organized into directories. Access control mechanism of the OS
determines who can access what.
The File Management Functions are
●​ Creating and deleting files and directories
●​ Manipulating files and directories (eg: open, close, etc)
●​ Recording files onto secondary storage (eg: save)
●​ Backup files onto stable (non-volatile) storage media
●​ Free-space management
(4) Device Management Functions (I/O Management Functions) :-:-
A computer communicates information through its I/O devices. Processes
access these devices through the OS. The OS attempts to manage all these
devices attached to a system.
Device Management (I/O Management) Functions include
●​ Keep track of the I/O devices, channels and control units. (I/O traffic
controller)
●​ Allocate the device
●​ Initiate the I/O operation.
●​ Reclaim the device. (In most cases the I/O operation terminates
automatically.)

(5) Network Management Functions:

Network management is the process of managing computer networks. Functions


of Network management:
●​ Provide networks
●​ Maintain the quality of service
●​ Performance management
●​ Fault analysis
●​ Provide access to various resources of a distributed system
(network share)
●​ Access shared resources that help to speed-up computation offer data
availability and reliability.

(6) Protection & Security Management Functions:

The various processes in an operating system need to be secured from each


other's activities. For that purpose, various mechanisms can be used to ensure
that those processes which want to operate files, memory, CPU, and other
hardware resources should have proper authorization from the operating
system.
Functions of Protection Management :
●​ Authentication
●​ Authorization
●​ Encryption
●​ File Access Control
Operating System Services
The OS provides certain services to the programs and to the users of those
programs.

One set of operating-system services provides functions that are helpful to the
user.

1. User interface (UI):


This interface can take several forms. One is a command-line interface (CLI),
which uses text commands and a method for entering them. Another is a batch
interface, in which commands and directives to control those commands are
entered into files, and those files are executed. Most commonly, a graphical user
interface (GUI) is used. Here, the interface is a window system with a pointing
device to direct I/O, choose from menus and make selections and a keyboard to
enter text.

2. Program execution:
The system must be able to load a program into memory and to run that
program. The program must be able to end its execution, either normally or
abnormally (indicating error).

3. I/O operations:
A running program may require I/O, which may involve a file or an I/O device.
For efficiency and protection, users usually cannot control I/O devices directly
and so the operating system must provide a means to do I/O.

4. File-system manipulation:
Programs need to read and write files and directories. Also some programs
include permission management to allow or deny access to files or directories
based on file ownership. So the OS must provide a way for this.

5. Communications:
There are many circumstances in which one process needs to exchange
information with another process. Communications may be implemented via
shared memory or through message passing, in which packets of information
are moved between processes by the operating system.

6. Error detection:
Errors may occur in the CPU and memory hardware (such as a memory error or
a power failure), in I/O devices (such as a parity error on tape, a connection
failure on a network, or lack of paper in the printer), and in the user program
(such as an arithmetic overflow, an attempt to access an illegal memory location,
or a too-great use of CPU time). For each type of error, the operating system
should take the appropriate action to ensure correct and consistent computing.

Another set of operating-system functions exists not for helping the user but for
ensuring the efficient operation of the system itself.

7. Resource allocation:
When there are multiple users or multiple jobs running at the same time,
resources must be allocated to each of them. Many different types of resources
are managed by the operating system such as CPU cycles, main memory, and
file storage, I/O devices etc.

8. Accounting:
We want to keep track of which users use how much and what kinds of
computer resources. This record keeping may be used for accounting (so that
users can be billed) or simply for accumulating usage statistics.

9. Protection and Security:


The owners of information stored in a multiuser or networked computer system
may want to control use of that information. Protection involves ensuring that all
access to system resources is controlled. Security refers to providing a
protection system to computer system resources such as CPU, memory, disk,
software programs and most importantly data/information stored in the computer
system. An unauthorized user may cause severe damage to the computer or
data stored in it. So a computer system must be protected against unauthorized
access, malicious (harmful) access to system memory, viruses, worms etc.
Unit III : Syllabus

Operating System: OS Definition, Functions, OS as a resource manager, types


of OS, Evolution of OS, Operating System Services, Process Basic Concepts,
Process Scheduling, Operations on Processes, Inter process communication,
CPU Scheduling - Scheduling Criteria, Scheduling Algorithms

You might also like