Lecture 5
Computer System & Operating System
Overview
1. Introduction to Operating Systems
2. Functions Performed by an OS
3. Types of OS
Mainframe OS
Server OS
Multiprocessor OS
PC OS
Real Time OS
Embedded OS
Networking OS
4. Batch Processing System
5. Multiprogramming
Operating System Concepts
7. Spooling
8. Instruction-Fetch-Execute Cycle
9. Structure of Disk Drive
10. Busses
11. Processes
12. Deadlocks
13. Memory Management
14. I/O
15. Files
Memory Management
Characteristics of Main Memory
1. It is a temporary storage device used to hold data temporary.
2. Main memory holds the programs and instructions which are
currently being executed by the CPU.
3. It is the fast access storage device.
4. It is read and write memory.
5. It is a volatile memory.
1. In a simple OS, only one program at a time is in the
memory. To run a second program, the first one has to be
removed and the second program placed in the memory.
2. Sophisticated OS allow multiple programs to be in the main
memory at the same time.
3. To keep them interfering with one another, some kind of
protection mechanism is needed.
4. Important memory related issue is managing the address
space of the processes.
OS managed the
address space
(contains data, registers
including program counter, stack pointer and all other
info. need to run the program) of the process.
Maximum amount of address space a process has is less
than the main memory, a process can fill up its address
space and there will be enough room in main memory to
hold it all.
What if a process has more address space
than the computer has main memory and the
process wants to use it all?
Technique called virtual memory exists, in which the
OS keeps part of the address space in the memory
and part on the disk and shuttles pieces back and
forth between them as needed.
Operating System Concepts-I/O
1. Operating system has I/O system for managing its I/
O devices.
2. Some of I/O software are device independent, i.e.
applies to many I/O devices equally well.
3. Device drivers are specific to particular I/O devices.
Operating System Concepts-Files
Directory way of grouping
files.
Example, file system for a
university department
What will be the path of file
CS101?
Operating System Concepts-Mounting File System
•
UNIX file system
– Allow to attach file system on a floppy disk to be attached to
the main tree (mounting) on the hard disk.
•
Before mounting
– files on floppy are inaccessible. The root file system is on the
hard disk and a second file system on the floppy disk.
•
After mounting floppy on b
– files on floppy are part of file hierarchy
Communication between processes in UNIX
A pipe, a sort of pseudo file that can be used to connect
two processes.
Operating System Concepts-System Call
1. System calls provide an interface between the process
and the operating system.
2. System calls allow user-level processes to request some
services from the operating system which process itself
is not allowed to do.
Examples
1. mkdir and rmdir
are used to create and remove
empty directories.
2. Link system call
is used to allow the same file to
appear under two or more names in different
directories.
•
System calls for Directory management
– Link(“/usr/jim/memo”, “usr/ast/note”);
–
Fig.a
Two directories before linking
/usr/jim/memo
to ast's directory
–
Fig.b
The same directories after linking
Note: Every file in UNIX has
a unique number called
i-number which identifies the
file
The principle metric prefixes
TOPICS COVERED
Introduction (Page 1, 2 &3)
1.1 What is an operating system?
1.1.1 The operating system is an extended machine 1.1.2 The operating system as a Resource Manager 1.2 History of Operating system
1.2.1 The first generation (1945-55) vacuum tubes and plugboards 1.2.2 The second generation (1955-65) transistors and batch system 1.2.3 The third generation (1965-1980) IC’s and multiprogramming 1.2.4 The forth generation (1980-Present) personal computers 1.3 The operating system zoo
1.3.1 Mainframe operating system
1.3.2 Networking/Server operating system
1.3.3 Distributed/Multiprocessor operating system