Operating System
Operating System
Operating System
Operating Systems
Lecture 1: Introduction to Operating Systems
• An operating system is a program that acts as an
intermediary between a user of a computer and the
computer hardware.
• The purpose of an operating system is to provide an
environment in which a user can execute programs.
The primary goal of an operating system is thus to
make the computer system convenient to use.
• A secondary goal is to use the computer hardware
in an efficient manner.
Lecture 1: Introduction to Operating Systems
• In brief, an operating system is the set of
that controls a computer. Some examples of
programs
operating systems are UNIX, Mach, MS-DOS, MS-
• Fourth Generation
With the development of LSI (Large Scale Integration) circuits, chips,
operating system entered in the personal computer and the workstation
age. Microprocessor technology evolved to the point that it becomes
possible to build desktop computers as powerful as the mainframes of the
1970s.
Lecture 2: Operating Systems Structure
• System Components
• Secondary-Storage Management
• Protection System
Protection refers to mechanism for controlling the access of
programs, processes, or users to the resources defined by a computer
system.
Registers
memory limits
list of open files
.
.
• Basic Concepts
1. When a process switches from the running state to the waiting state (for.
example, I/O request, or invocation of wait for the termination of one of
the child processes).
2. When a process switches from the running state to the ready state (for
example, when an interrupt occurs).
3. When a process switches from the waiting state to the ready state (for
example, completion of I/O).
• Switching context.
• Switching to user mode.
• Jumping to the proper location in the user program to restart that program
• Scheduling Criteria
2. Shortest-Job-First Scheduling
3. Priority Scheduling
4. Round-Robin Scheduling
P1 P2 P3
0 24 27 30
Shortest-Job-First Scheduling
Process Burst Time
P1 6
P2 8
P3 7
P4 3
P4 P1 P3 P2
0 3 9 16 24
Priority Scheduling
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
P2 P5 P1 P3 P4
Round-Robin Scheduling
P1 24
P2 3
P3 3
Multilevel Queue Scheduling
• In a multilevel queue scheduling processes are permanently
assigned to one queues.
• The processes are permanently assigned to one
another, based on some property of the process, such as
• Memory size
• Process priority
• Process type
Information sharing
Computation speedup
Modularity
Convenience
Race condition
• When several processes access and
manipulate the same data concurrently and
the outcome of the execution depends on the
particular order in which the access takes
place, is called a race condition.
The Critical-Section Problem
• The important feature of the system is that, when one process
is executing in its critical section, no other process is to be
allowed to execute in its critical section.
Request Use
Release
Deadlock Characterization