0% found this document useful (0 votes)
14 views

OS LEcture 2

The document discusses key concepts in operating systems including: 1. Operating systems provide services like program execution, I/O, file manipulation, communication, and error detection. 2. Multitasking allows multiple programs to run concurrently by rapidly switching the CPU between them. 3. Multiprogramming keeps multiple jobs in memory simultaneously to improve CPU utilization. 4. Time-sharing extends multiprogramming by allowing users to interact with programs while they run, giving the impression each user has their own computer.

Uploaded by

edwardalonzo0723
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)
14 views

OS LEcture 2

The document discusses key concepts in operating systems including: 1. Operating systems provide services like program execution, I/O, file manipulation, communication, and error detection. 2. Multitasking allows multiple programs to run concurrently by rapidly switching the CPU between them. 3. Multiprogramming keeps multiple jobs in memory simultaneously to improve CPU utilization. 4. Time-sharing extends multiprogramming by allowing users to interact with programs while they run, giving the impression each user has their own computer.

Uploaded by

edwardalonzo0723
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/ 39

OPERATING

`AZ21666666666666666666666
6666G\ SYSTEM
Objectives:
After going through this unit, you will be able to:

1. To describe the services an operating system provides to


users, processes, and other systems
2. Describe operating system services and its components.
3. Define multitasking and multiprogramming.
4. Describe timesharing, buffering & spooling.
FUNDAMENTAL OF OPERATING SYSTEM
INTRODUCTION

An operating system provides the environment within

which programs are executed. Internally, operating

systems vary greatly in their makeup, since they are

organized along many different lines. The design of a

new operating system is a major task. It is important

that the goals of the system be well defined before the

design begins.
We can view an operating system from several vantage
points. One view focuses on the services that the system
provides, another, on the interface that it makes available to
users and programmers; a third, on its components and their
interconnections.
OPERATING SYSTEM SERVICES

An operating system provides services to programs and to


the users of those programs. It provided by one environment for
the execution of programs. The services provided by one
operating system is difficult than other operating system.
Operating system makes the programming task easier.
The common service provided by the
operating system is listed below.
1. Program execution

2. I/O operation

3. File system manipulation

4. Communications

5. Error detection
Common service provided by the
operating system
1. Program execution: Operating system loads a program into
memory and executes the program. The program must be
able to end its execution, either normally or abnormally.

2. I/O Operation : I/O means any file or any specific I/O device.
Program may require any I/O device while running. So
operating system must provide the required I/O.
3. File system manipulation : Program needs to read a file or
write a file. The operating system gives the permission to the
program for operation on file.

4. Communication : Data transfer between two processes is


required for some time. The both processes are on the one
computer or on different computer but connected through
computer network. Communication may be implemented by two
methods: a. Shared memory b. Message passing.
5. Error detection : error may occur in CPU, in I/O devices or in
the memory hardware. The operating system constantly needs to
be aware of possible errors. It should take the appropriate action
to ensure correct and consistent computing.
• Operating system with multiple users provides following
services.

1. Resource Allocation
2. Accounting
3. Protection
A) Resource Allocation :

• If there are more than one user or jobs running at the same
time, then resources must be allocated to each of them.
Operating system manages different types of resources require
special allocation code, i.e. main memory, CPU cycles and file
storage.
• There are some resources which require only general request
and release code. For allocating CPU, CPU scheduling
algorithms are used for better utilization of CPU.

• CPU scheduling algorithms are used for better utilization of


CPU. CPU scheduling routines consider the speed of the CPU,
number of available registers and other required factors.
B) Accounting :

• Logs of each user must be kept. It is also necessary to keep


record of which user how much and what kinds of computer
resources. This log is used for accounting purposes.

• The accounting data may be used for statistics or for the billing.
It also used to improve system efficiency.
C) Protection :

• Protection involves ensuring that all access to system resources is


controlled. Security starts with each user having to authenticate to
the system, usually by means of a password. External I/O devices
must be also protected from invalid access attempts.

• In protection, all the access to the resources is controlled. In


multiprocess environment, it is possible that, one process to
interface with the other, or with the operating system, so protection
is required.
OPERATING SYSTEM COMPONENTS
• Modern operating systems share the goal of supporting the

system components. The system components are :


1. Process Management
2. Main Memory Management
3. File Management
4. Secondary Storage Management
5. I/O System Management
6. Networking
7. Protection System
8. Command Interpreter System
BATCH SYSTEM
• Some computer systems only did one thing at a time. They had a list of
the computer system may be dedicated to a single program until its
completion, or they may be dynamically reassigned among a collection
of active programs in different stages of execution.

• Batch operating system is one where programs and data are

collected together in a batch before processing starts. A job is


predefined sequence of commands, programs and data that are
combined in to a single unit called job.
Fig. 2.1 shows the memory
layout for a simple batch
system.

Memory management in batch


system is very simple.

Memory is usually divided into


two areas : Operating system Fig 2.1 Memory Layout
for a Simple Batch
and user program area. System
• Scheduling is also simple in batch system. Jobs are processed
in the order of submission i.e first come first served fashion.

• When job completed execution, its memory is releases and the


output for the job gets copied into an output spool for later
printing.

• Batch system often provides simple forms of file management.


Access to file is serial. Batch systems do not require any time
critical device management.
• Batch systems are inconvenient for users because users can
not interact with their jobs to fix problems. There may also be
long turn around times. Example of this system id generating
monthly bank statement.
Advantages of Batch System
• Move much of the work of the operator to the computer.

• Increased performance since it was possible for job to start as


soon as the previous job finished.
Disadvantages of Batch System

• Turn around time can be large from user standpoint.

• Difficult to debug program.

• A job could enter an infinite loop.

• A job could corrupt the monitor, thus affecting pending jobs.

• Due to lack of protection scheme, one batch job can affect


pending jobs
TIME SHARING SYSTEMS
• Multi-programmed batched systems provide an environment
where the various system resources (for example, CPU, memory,
peripheral devices) are utilized effectively.

• Time sharing, or multitasking, is a logical extension of


multiprogramming. Multiple jobs are executed by the CPU
switching between them, but the switches occur so frequently that
the users may interact with each program while it is running.
• A time-shared operating system allows the many users to share
the computer simultaneously. Since each action or command in a
time-shared system tends to be short, only a little CPU time is
needed for each user. As the system switches rapidly from one
user to the next, each user is given the impression that she has
her own computer, whereas actually one computer is being
shared among many users.
• Time-sharing operating systems are even more complex than
are multi-programmed operating systems. As in
multiprogramming, several jobs must be kept simultaneously in
memory, which requires some form of memory management
and protection.
MULTIPROGRAMMING

• When two or more programs are in memory at the same time,


sharing the processor is referred to the multiprogramming
operating system. Multiprogramming assumes a single
processor that is being shared. Increases CPU utilization by
organizing jobs so that the CPU always has one to execute.
• The operating system keeps several jobs in memory at a time.
This set of jobs is a subset of the jobs kept in the job pool. The
operating system picks and begins to execute one of the job in
the memory.

• Multiprogrammed systems provide an environment in which the


various system resources are utilized effectively, but they do not
provide for user interaction with the computer system.
• Jobs entering into the system are kept into the memory.
Operating system picks the job and begins to execute one of
the job in the memory. Having several programs in memory at
the same time requires some form of memory management.

• Multiprogramming operating system monitors the state of all


active programs and system resources. This ensures that the
CPU is never idle unless there are no jobs.
Advantages

1. High CPU utilization.

2. It appears that many programs are allotted CPU almost


simultaneously.
Disadvantages

1. CPU scheduling is required.

2. To accommodate many jobs in memory, memory management


is required.
SPOOLING
• Acronym for simultaneous peripheral operations on line.
Spooling refers to putting jobs in a buffer, a special area in
memory or on a disk where a device can access them when it is
ready.

• Spooling is useful because device access data that different


rates. The buffer provides a waiting station where data can rest
while the slower device catches up. Fig 2.3 shows the spooling.
• Computer can perform I/O in parallel with computation, it
becomes possible to have the computer read a deck of cards to
a tape, drum or disk and to write out to a tape printer while it
was computing. This process is called spooling.

• The most common spooling application is print spooling. In print


spooling, documents are loaded into a buffer and then the
printer pulls them off the buffer at its own rate.
Advantage of Spooling
1. The spooling operation uses a disk as a very large buffer.

2. Spooling is however capable of overlapping I/O operation for


one job with processor operations for another job.
8 ESSENTIAL PROPERTIES OF THE
OPERATING SYSTEM
1. Batch : Jobs with similar needs are batched together and run
through the computer as a group by an operator or automatic job
sequencer. Performance is increased by attempting to keep CPU
and I/O devices busy at all times through buffering , off line
operation, spooling and multiprogramming. A Batch system is good
for executing large jobs that need little interaction, it can be
submitted and picked up latter.
2. Time sharing : Uses CPU s scheduling and multiprogramming to
provide economical interactive use of a system. The CPU switches
rapidly from one user to another i.e. the CPU is shared between a
number of interactive users. Instead of having a job defined by
spooled card images, each program reads its next control
instructions from the terminal and output is normally printed
immediately on the screen.
3. Interactive : User is on line with computer system and interacts
with it via an interface. It is typically composed of many short
transactions where the result of the next transaction may be
unpredictable. Response time needs to be short since the user
submits and waits for the result.
4. Real time system : Real time systems are usually dedicated,
embedded systems. They typically read from and react to sensor
data. The system must guarantee response to events within fixed
periods of time to ensure correct performance.

5. Distributed : Distributes computation among several physical


processors. The processors do not share memory or a clock.
Instead, each processor has its own local memory. They
communicate with each other through various communication
lines.
Prepared by:
MARIE CELIA R. AGLIBOT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy