Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Introduction to OS

Rating
-
Sold
-
Pages
24
Uploaded on
31-07-2025
Written in
2024/2025

U can learn How does Os works and introduction to it.

Institution
Course

Content preview

1.OPERATING SYSTEMS OVERVIEW

1.1 Introduction:

A program that acts as an intermediary between a user of a computer and the computer hardware

⮚ Pupose: of an os is to provide an environment in which a user can execute programs

conveniently and efficiently.

⮚ Os is s/w that manages computer h/w.

⮚ H/w must provide appropriate mechanisms to ensure the correct operation of the computer

system and to prevent user programs from interfering with the proper operation of the system.

⮚ Operating System Definition: A program that acts as an intermediary between a user of a

computer and the computer hardware.

Operating system goals:

● Execute user programs and make solving user problems easier
● Make the computer system convenient to use
● Use the computer hardware in an efficient manner

Computer System Structure:
Computer system can be divided into four components.

● Hardware – provides basic computing resources CPU, memory, I/O devices
● Operating system-Controls and coordinates use of hardware among various applications and users
● Application programs – define the ways in which the system resources are used to solve the
computing problems of the users
-Word processors, compilers, web browsers, database systems,
video games
● Users
- People, machines, other computers

Four Components of a Computer System

,To explore os from 2 view points. They are

1. User view:
● The main goal is to maximize the work .
● The os is designed mostly for “ease of use”, with some attention paid to performance & none paid to
resource utilization.
● resource utilization.: how various h/w & s/w resources are shared.

2. Systenm view:
● Os as a resource allocator .
● A computer system has many resources that may be required to solve a problem like, CPU time, memory
space,file-storage space, I/O devices and so on..

An os is a control program.
Control program- it manages the execution of user programs to prevent errors & improper use of the
computer.

Another definition of os: the os is one program running at all times on the computer, usually called as
kernel.
Along with the kernel there are 2 other types of programs: they are
1. System programs: which are assocaited with the os but are not necessarily part of the kernel.
2. Application Programs: which include all programs not associated with the operation of the system.

Os for mobile devices, include not only a core kernel but also ‘middleware’.
Middleware- a set of s/w frame works that provides a additional services to application developers.
Ex: apple’s ios and google’s android
Features a core kernel along with middleware that supports databases, multimedia, & graphics.

1.2 Operating Systems Operations:-

Modern operating systems are interrupt driven. If there are no processes to execute, no I/O devices to service,
and no users to whom to respond, an operating system will sit quietly, waiting for something to happen. Events
are signaled by the occurrence of an interrupt or a trap.
A trap (or an exception) is a software-generated interrupt. For each type of interrupt, separate segments of code
in the operating system determine what action should be taken.
An interrupt service routine is provided that is responsible for dealing with the interrupt.
Mainly 2 operations are performed.they are
a) Dual-Mode Operation:-
In order to ensure the proper execution of the os, we must be able to distinguish b/w the execution of os code &
user defined code.
The approach taken is to use a hardware support that allows us to differentiate among various modes of
execution.
The system can be assumed to work in two separate modes of operation:
• user mode and
• kernel mode (supervisor mode, system mode, or privileged mode).
A hardware bit of the computer, called the mode bit, is used to indicate the current mode: kernel (0) or user

(1). With the mode bit, we are able to distinguish between a task that is executed by the operating system and
one that is executed by the user.
When the computer system is executing a user application, the system is in user mode.
When a user application requests a service from the operating system (via a system call), the transition from
user to kernel mode takes place.
Its shows in below fig:

, ⮚ At system boot time, the hardware starts in kernel mode.
⮚ The operating system is then loaded and starts user applications in user mode. Whenever a trap or interrupt
occurs, the hardware switches from user mode to kernel mode (that is, changes the mode bit from 1 to 0).
Thus, whenever the operating system gains control of the computer, it is in kernel mode.
⮚ The dual mode of operation provides us with the means for protecting the operating system from errant
users—and errant users from one another.
⮚ The hardware allows privileged instructions to be executed only in kernel mode
⮚ . If an attempt is made to execute a privileged instruction in user mode, the hardware does not execute the
instruction but rather treats it as illegal and traps it to the operating system.
⮚ The instruction to switch to user mode is an example of a privileged instruction.
⮚ Initial control is within the operating system, where instructions are executed in kernel mode.
⮚ When control is given to a user application, the mode is set to user mode. Eventually, control is switched
back to the operating system via an interrupt, a trap, or a system call.

b) Timer :-Operating system uses timer to control the CPU. A user program cannot hold CPU for a long time,
this is prevented with the help of timer. A timer can be set to interrupt the computer after a specified period.
The period may be fixed (for example, 1/60 second) or variable (for example, from 1 millisecond to 1 second).
Fixed timer – After a fixed time, the process under execution is interrupted.
Variable timer – Interrupt occurs after varying interval. This is implemented using a fixed-rate clock and a
counter. The operating system sets the counter. Every time the clock ticks, the counter is decremented. When
the counter reaches 0, an interrupt occurs. Before changing to the user mode, the operating system ensures that
the timer is set to interrupt. If the timer interrupts, control transfers automatically to the operating system, which
may treat the interrupt as a fatal error or may give the program more time.

1.3 Process Management:-
A Program does nothing unless its instructions are executed by a CPU. A program in execution is called a
process. In order to accomplish its task, process needs the computer resources.
There may exist more than one process in the system which may require the same resource at the same time.
Therefore, the operating system has to manage all the processes and the resources in a convenient and efficient
way.
Some resources may need to be executed by one process at one time to maintain the consistency otherwise the
system can become inconsistent and deadlock may occur.
The operating system is responsible for the following activities in connection with Process Management


1. Scheduling processes and threads on the CPUs.
2. Creating and deleting both user and system processes.
3. Suspending and resuming processes.
4. Providing mechanisms for process synchronization.

Written for

Course

Document information

Uploaded on
July 31, 2025
Number of pages
24
Written in
2024/2025
Type
Class notes
Professor(s)
Lingaiah
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
gayathrisriyellavula

Also available in package deal

Get to know the seller

Seller avatar
gayathrisriyellavula Marri Laxman Reddy institute of technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
9 months
Number of followers
0
Documents
9
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions