Introduction OS
Introduction OS
Introduction to
Operating System
Looping
Outline
• Computer system overview
• Computer system architecture
• What is Operating System (OS)
• Roles of Operating System (OS)
• Objectives / Goals of Operating System (OS)
• Generations of Operating Systems (OS)
• Operating Systems (OS) services
• Types of Operating Systems (OS)
• System calls
• Operating Systems (OS) structure
• Multiprogramming v/s Multiprocessing v/s Multitasking
• Time Sharing Operating System
• Parallel Processing Operating System
• Distributed Operating System
Section - 1
Basic elements of computer
I/O
Processor
Modules
System
Memory
Bus
Referred to as the
Central Processing
Unit (CPU)
• Volatile • Non-Volatile
• RAM & ROM • HDD, CD & DVD
Exercise Give the difference between primary memory and secondary memory.
Examples
of
Operating
System
The disk controller will find the requested User has to check the status of disk
data in the disk and fetch it from disk to controller operation where it has
disk controller buffer. finished or not.
7+9–6*4/2=4
20
P1 P2 P3 P4
3 4 1 2
Main Memory
Vacuum tubes
Plug board
Programmers bring
1401 cards
reads to
batch
1401
Operator
of jobscarries
onto tape
input
7094tape
Operator
does
to computing
7094
carries output1401
tape prints
to 1401output
Exercise Give the name of any five code editor for windows?
Unit 1 – Introduction to Operating System 46
Services / Functions / Tasks of Operating System (OS)
2. Program execution
Following tasks need to be perform to execute a program:
Instructions and data must be loaded into main memory.
I/O devices and files must be initialized.
The OS handles all these duties for the user.
P1
P2
Advantages of Multiprogramming OS
• Throughout the system, it increased as the CPU always had one
program to execute.
• Response time can also be reduced.
Disadvantages of Multiprogramming OS
• Multiprogramming systems provide an environment in which various
systems resources are used efficiently, but they do not provide any
user interaction with the computer system.
Advantages:
• Increased reliability: Due to the multiprocessing system, processing tasks can
be distributed among several processors. This increases reliability as if one
processor fails, the task can be given to another processor for completion.
• Increased throughout: As several processors increase, more work can be done
in less.
Disadvantages:
• Multiprocessing operating system is more complex and sophisticated as it
takes care of multiple CPUs simultaneously.
Advantages
• Timesharing
• Responsive
• Handle multiple users
• Protected memory
Disadvantages
• doing multitasking, the processor becomes busy all the time and CPU
heats up. To solve this problem you have to attach the cooling system
to your CPU.
Advantages
• In this type of operating system, network traffic reduces due to the
division between clients and the server.
• This type of system is less expensive to set up and maintain.
Disadvantages
• In this type of operating system, the failure of any node in a system
affects the whole system.
• Security and performance are important issues. So trained network
administrators are required for network administration.
Advantages
• The distributed operating system provides sharing of resources.
• This type of system is fault-tolerant.
Disadvantages
• Protocol overhead can dominate computation cost.
The storage capacity available in them is typically 32 × 32 bits on a 32-bit CPU and 64 × 64 bits on a 64-bit
CPU
Cache miss
Cache hit
L1, L2, L3 Cache
Here, two outputs are possible because the parent process and child
process are running concurrently. So we don’t know whether the OS will
first give control to the parent process or the child process.
Every file in UNIX has a unique number, its i-number, that identifies it. This i-number is an index into a table of i-nodes, one per file,
telling who owns the file, where its disk blocks are, and so on. A directory is simply a file containing a set of (i-number, ASCII name)
pairs.
Unit 1 – Introduction to Operating System 91
By executing the mount system call, the USB file system can be attached to the root file system
mount("/dev/sdb0", "/mnt", 0);
where the first parameter is the name of a block special file for USB drive 0, the second parameter is the place in the
tree where it is to be mounted, and the third parameter tells whether the file system is to be mounted read-write or
read-only.
After the mount call, a file on drive 0 can be accessed by just using its path from the root directory or the working directory, without
regard to which drive it is on.
chmod("file", 0644);
In many operating systems, all the information about each process, other than the contents of its own address
space, is stored in an operating system table called the process table, which is an array of structures, one for
each process currently in existence.
Thus, a (suspended) process consists of its address space, usually called the core image (in honor of the
magnetic core memories used in days of yore), and its process table entry, which contains the contents of its
registers and many other items needed to restart the process later.
Thank
You