Operating Systems-Unit 1
Operating Systems-Unit 1
Operating Systems-Unit 1
UNIT -1
Syllabus
OS Introduction.
Memory Management.
OS CA Components
Class Test 1 Class Test 2 Experiential Learning Assignment
10 10 15 5
Saturday, February 1, 2020 Saturday, April 4, 2020 Jan-April 2020 Saturday, March 7, 2020
OS Lab CA Components
Y Kanetkar,” Unix Shell Programming”, 1st Edition, 2008 by BPB Publications, ISBN:
978-81-7029-753-2.
Phases of Computing
Some key points…..
Program Running
Process
What is OS cont..
Operating System is a software, which makes a
computer to actually work.
2. The PC displays information on the attached monitor showing details about the
boot process.
3. The BIOS attempts to access the first sector of the hard drive known as the boot
disk. The boot disk is typically the same hard disk that contains your operating
system.
4. The BIOS confirms there's a bootstrap loader, or boot loader, in that first sector
of the boot disk, and it loads that boot loader into memory (RAM). The boot
loader is a small program designed to find and launch the PC's operating system.
5. Once the boot loader is in memory, the BIOS hands over its work to the boot
loader, which in turn begins loading the operating system into memory. When
the boot loader finishes its task, it turns control of the PC over to the operating
Bootstrap Process
OS Services
An Operating System provides services to both
the users and to the programs.
It provides programs, an environment to execute.
It provides users, services to execute the
programs in a convenient manner.
Several people can use a UNIX computer at the same time; hence
UNIX is called a multiuser system.
A user can also run multiple programs at the same time; hence
UNIX is called multitasking.
Unix Structure
Four Basics of UNIX
Kernel: The kernel is the heart of the operating system. It interacts
with hardware and most of the tasks like memory management,
task scheduling and file management.
Shell: The shell is the utility that processes your requests. When
you type in a command at your terminal, the shell interprets the
command and calls the program that you want. The shell uses
standard syntax for all commands. C Shell, Bourne Shell and Korn
Shell are most famous shells which are available with most of the
Unix variants.
Files and Directories: All data in UNIX is organized into files. All
files are organized into directories. These directories are organized
into a tree-like structure called the file system.
Unix Architecture
The File Subsystem
The characteristics of unix file system are:
A hierarchal structure.
Consistent treatment of data.
Ability to create and delete files.
Dynamic growth of files.
Peripheral devices are also treated as files.
This inode is short form for index node. Every file has one inode.
The inodes of all the files on the system are stored in inode table.
When we create a new file a new entry in the inode table is created.
The kernel contain two data structures: file table and user file
descriptor table. The file table is global table at the kernel level
but the user file descriptor table is for every process. When a
process creates a file or opens a file the entry for that is made in
both the tables.
The user file descriptor table keeps a track of all the files opened by
File System Layout
Process Subsystem
KERNEL process is created as part of the booting .
device num
logical file system number
block num
block number of the data on disk
status
The buffer is currently locked.
The buffer contains valid data.
delayed-write
The kernel is currently reading or writing the contents of the
disk.
A process is currently waiting for the buffer to become free.
kernel identifies the buffer content by examing
device num and block num.
An operating system is a software that :
acts as an interface between the user and the
computer hardware and controls the execution of all
kinds of programs.
performs all the basic tasks like file management,
memory management, process management,
handling input and output, and controlling
peripheral devices such as disk drives and printers.
Some popular Operating Systems are Linux,
Windows, OS X, VMS, OS/400, AIX, z/OS, etc.
1) Monolithic Operating System
2) Layered Operating System
3) Microkernel Operating system
4) Networked and Distributed Operating System
A monolithic os is an operating system
architecture where the entire operating system is
working in kernel space and is alone in supervisor
mode.
Every component of the operating system is
contained in the kernel and can directly
communicate with any other (i.e., simply by using
function calls). The kernel typically executes with
unrestricted access to the computer system.
Ex:- OS/360,VMS and LINUX.
As operating systems became larger and more
complex, purely monolithic designs became unwieldy.
The layered approach to operating systems attempts
to address this issue by grouping components that
perform similar functions into layers.
Each layer communicates exclusively with those
immediately above and below it.
Lowerlevel layers provide services to higher-level ones
using an interface that hides their implementation.
EX :- The THE operating system is an early example of
a layered operating system .Windows XP and Linux,
implement some level of layering.
In microkernel designs, most operating system
components—such as process management,
networking, file system interaction and device
management—execute outside the kernel with a lower
privilege level.
Microkernels exhibit a high degree of modularity,
making them extensible, portable and scalable.
Further, because the microkernel does not rely on
each component to execute, one or more components
can fail, without causing the operating system to fail.
system that
EX :-MIT's manages
Chord resources
operating on and
system more than
the one computer
Amoeba
system.
operating system from the Vrije Universiteit (VU) in
Amsterdam.
Two Types of Lists that
are used in Buffer Cache
An operating system is a software that :
acts as an interface between the user and the
computer hardware and controls the execution of all
kinds of programs.
performs all the basic tasks like file management,
memory management, process management,
handling input and output, and controlling
peripheral devices such as disk drives and printers.
Some popular Operating Systems are Linux,
Windows, OS X, VMS, OS/400, AIX, z/OS, etc.
1) Monolithic Operating System
2) Layered Operating System
3) Microkernel Operating system
4) Networked and Distributed Operating System
A monolithic os is an operating system
architecture where the entire operating system is
working in kernel space and is alone in supervisor
mode.
Every component of the operating system is
contained in the kernel and can directly
communicate with any other (i.e., simply by using
function calls). The kernel typically executes with
unrestricted access to the computer system.
Ex:- OS/360,VMS and LINUX.
As operating systems became larger and more
complex, purely monolithic designs became unwieldy.
The layered approach to operating systems attempts
to address this issue by grouping components that
perform similar functions into layers.
Each layer communicates exclusively with those
immediately above and below it.
Lowerlevel layers provide services to higher-level ones
using an interface that hides their implementation.
EX :- The THE operating system is an early example of
a layered operating system .Windows XP and Linux,
implement some level of layering.
In microkernel designs, most operating system
components—such as process management,
networking, file system interaction and device
management—execute outside the kernel with a lower
privilege level.
Microkernels exhibit a high degree of modularity,
making them extensible, portable and scalable.
Further, because the microkernel does not rely on
each component to execute, one or more components
can fail, without causing the operating system to fail.
system that
EX :-MIT's manages
Chord resources
operating on and
system more than
the one computer
Amoeba
system.
operating system from the Vrije Universiteit (VU) in
Amsterdam.
Two Types of Lists that
are used in Buffer Cache
Structure of Hash Queue
When the kernel accesses a disk block, separate
queue (doublely linked circular list) is formed
and it is hashed as a function of the device and
block num Every disk block exists on one and
only on hash queue and only once on the queue.
Structure of the Free List
78
Buffer pool according to LRU
The kernel maintains a free list of buffer
doubly linked list
take a buffer from the head of the free list.
When returning a buffer, attaches the buffer to the tail.
Structure of the buffer pool
Initially all the disk blocks would be in free list
2. Copying data from user buffers to system buffers => eliminates the
need for special alignment of user buffers.
3. The buffer algo. help insure file system integrity, because they
maintain a common, single image of disk blocks contained in the
cache. Single image of of disk blocks contained in the cache => helps
insure file system integrity.
4. Use of the buffer cache can reduce the amount of disk traffic, thereby
increasing overall system throughput and decreasing response time.
System Calls
The way that programs talk to the operating system
is via ``system calls.'' It is a request to the
operating system to perform some activity. System
calls allow user-level processes to request some
services from the operating system which process
itself is not allowed to do.
System Call
When a program in user mode requires access to RAM or a
hardware resource, it must ask the kernel to provide access
to that resource. This is done via something called
a system call.
When a program makes a system call, the mode is switched
from user mode to kernel mode. This is called a context
switch.
Types of System Calls
Thank you!!!!
Happy Studying!!!