Basics of Operating Systems: Drnmpatel Associate Professor Computer Engineering Department BVM Engineering College
Basics of Operating Systems: Drnmpatel Associate Professor Computer Engineering Department BVM Engineering College
Dr N M Patel
Associate Professor
Computer Engineering Department
BVM Engineering College
Operating systems
Course Objective:
• To impart knowledge of operating system from user and design
perspectives
Course Outcomes (COs): After learning the course students will be able to
• 1. Understand various Operating Systems concepts such as process, system
calls, multiprocessing, race and dead-locks etc.
• 2. Analyze various scheduling algorithms
• 3. Apprehend virtual memory management, and compare various paging
and segmentation schemes.
• 4. Analyze file systems from user and design perspective.
• 5. Analyze protection and security mechanisms of OS
• 6. Experiment with low level implantation of OS concepts, at lab and mini-
projects level.
Operating systems
• List of References:
• 1. Andrew S. Tanenbaum, “Modern Operating
Systems”, Prentice Hall International
• 2. Silberschatz and Galvin, “Operating System
Concepts”, John Willey and Sons
• 3. William Stallings,“Operating Systems”
Prentice Hall of India
• 4. D.M.Dhamdhere, “Operating Systems”, Tata
McGraw Hill
Why os is required?
$chsh -l
Files
User perspective
How they are named and organized
Hierarchical File System
Process and file hierarchies both are organized as trees
Process hierarchies are not very deep, short-lived ( few
minutes), ownership and protection
Directory Structure
/
c
user1 user2 user3
a l
t s p p
r r Desktop
Director
o o
y
g g s
r r t File
m m a
Directory : As a way of
1 2 r
grouping files together
t
File system
• Every file can be specified by giving its path name from the top
of directory hierarchy, the root directory
• Two types of path : absolute and relative
• Every process has current directory
• System call related to files : open,read,write, dup, lseek, fcntl,…
• Mounting files : attach other file system with root file system
• Special files : devices are treated as files, block and character,
pipe
• Security : nine bit protection code
• For directory x indicates search permission
OS
Convenience
Efficiency
History of operating systems
Os Evolved through the years because enhancement in
semiconductor technology, evolved new hardware
OS closely tied to the architecture of the computers on which
they run
First digital computer was designed by Charles Babbage. It was
purely mechanical
First generation : vacuum tubes, used for numerical
calculations such as tables of sines, cosines and log
All programming was done in absolute machine language. No
OS. Wiring up plug boards to control the machine’s basic
functions
Second generation : transistor
Known as mainframes. Used for scientific and engineering
calculations such as solving the partial differential equations
Given the high cost of the equipment, it is not surprising that people
quickly looked for ways to reduce the wasted time. The solution generally
adopted was the batch system. Batch operating system : FMS(Fortran
monitor system) and IBSYS (IBM os for 7094)
Batch OS : in form of monitor program
Software that controls the sequence of events
Batch jobs together. (i.e., a program or set of programs), Hence
the operating system in this case had to just transfer control
from one job to another in a sequential manner
Program branches back to monitor when finished
Limitations : separate machine for I/O and computation
Current job paused to wait for a tape or other I/O operation ,
CPU simply sat idle until the I/O finished(scientific calculation
: I/O is infrequent but Commercial data processing, The I/O
wait can be 80 to 90% of total time)
Third generation : ICS &Multiprogramming OS:
e.g. IBM 360, 370,4300,3080,3090..
Multiple jobs are in memory
When one job needs to wait for I/O, the processor can switch to the
other job. Enough job could be held in memory at once the CPU could
be busy nearly 100% of the time
The operating system now has additional functionalities of selecting
jobs from the disk to be brought into the main memory(This is done by
the job scheduler ) and selecting one of the jobs in the main memory to
be given to the CPU( CPU scheduler)
Multiprogramming OS
Decision has to be made as to where to place the jobs
in the main memory. Hence memory management was
added as a functionality of the operating system. I/O
devices also have to be allocated to processes. Hence
I/O management was included as a functionality to the
operating system.
Spooling : Simultaneous peripheral operation on line)
Limitation : no user interaction
Limitation: no use interaction
Real-time systems
main()
{
char m[20]=“hello\n”;
asm(“mov $4,%eax”);
asm(“mov $1,”ebx”);
asm(“mov $m,”%ecx”);
asm(“mov $7,%edx”);
Asm(“int $128”);
POSIX
Buffer
cache
Windows NT
Questions