Unit1 - Introduction To OS1
Unit1 - Introduction To OS1
*[https://www.tutorialspoint.com/operating_system/os_types.htm]
TYPES OF OS: Batch Systems
Disadvantages:
No interaction between user and computer.
No mechanism to prioritize the processes
TYPES OF OS: Batch Systems
The common input devices were card readers and tape drives.
The common output devices were line printers, tape drives, and
card punches.
https://www.youtube.com/watch?v=sq2SE_GbZ34
Multiprogrammed OS
Multiprogramming: When 2 or more processes reside in
memory at the same time
Single user processes cannot keep CPU and I/O devices busy
at all times
Multiprogramming organizes jobs (code and data) so CPU
always has one to execute
Multiprogramming assumes a single shared processor. One
job selected and run via job scheduling
Multiprogramming increases CPU utilization.
It is mixture of I/O bound and CPU bound processes
Multiprogrammed OS
In this the operating system picks up and begins to execute
one of the jobs from memory.
Jobs in the memory are always less than the number of jobs
on disk(Job Pool).
Multiprogrammed OS
If several jobs are ready to run at the same time, then the
system chooses which one to run through the process of
CPU Scheduling.
Time Driven
Task specific
MS-DOS – written to
provide the most
functionality in the least
space
Not divided into modules
Although MS-DOS has
some structure, its
interfaces and levels of
functionality are not well
separated
Non Simple Structure -- UNIX
Monolithic
Microkernel
Hybrid
Monolithic Kernel
A monolithic kernel is an operating system architecture
where the entire operating system (which includes the device
drivers, file system, and the application IPC etc.) is working
in kernel space, in supervisor mode.
This reduces the kernel code size and also increases the
security and stability of OS as we have minimum code running
in kernel.
Cons
Hardware is more abstracted through drivers
Hardware may react slower because drivers are in user mode
Processes have to wait in a queue to get information
Processes can’t get access to other processes without waiting
HybridKernel
Hybrid kernels have the ability to pick and choose what they
want to run in user mode and what they want to run in
supervisor mode.
Device drivers and file system I/O will be run in user mode
while IPC and server calls will be kept in the supervisor
mode.
This require more work of the hardware manufacturer
because all of the driver responsibility is up to them.
Hybrid Kernel
Pros
Developer can pick and choose what runs in user mode and
what runs in supervisor mode
Smaller install than monolithic kernel
More flexible than other models
Cons
Processes have to wait in a queue to get information
Processes can’t get access to other processes without
waiting
Device drivers need to be managed by user
Interrupts
An interrupt is a signal from a device attached to a
computer or from a program within the computer that
causes the main program that operates the computer (the
operating system) to stop and figure out what to do next.
System calls are implemented via API, API’s interact with kernel of
OS.
Example of System Calls
System call sequence to copy the contents of
one file to another file
System Call Implementation
A number is associated with each system call
System-call interface maintains a table indexed according to
these numbers