Professional Documents
Culture Documents
Os 1
Os 1
• No OS
If you are working on MC6800 hardware then the instructions will be:
LDAA $80 – Loading the number at memory location 80
LDAB $81 – Loading the number at memory location 81
ADDB – Adding these two numbers
STAA $55 – Storing the sum to memory location 55
But the moment you hardware changes, for example, say to 8086 or 8088, all the above
instructions will change, a problem!
• With OS
Use any High Level Language like C.
Write c=a+b;
The underlying hardware does not matter because OS takes care of convertion. Infact this is
what we always do. Have we ever bothered what hardware are we using. Our focus is just
writing the code correctly in C, C++, Python etc.
Can we use the system without installing an
Operating System?
• Views of Operating System
• Use of operating system depends upon who is using it and what is the need in that
particular scenario there are different views.
1. User view
2. System view
User’s point of view, the operating system should offer ease of use and performance.
Example, Windows is very popular because it is very easy to use as it is having a
graphical user interface. Similarly, Android became very popular and it became one of
the reasons that Nokia’s Symbian OS lost its market value.
• But from the system’s point of view, the OS should act as a Resource Manager, which
means that the OS should be able to manage all the hardware resources in the system.
Hence, all hardware should be used in the most efficient manner and the process
should be kept waiting for a minimum amount of time if they require any resource
Uni-programming vs Multi Programming vs Time Sharing
• Uni-programming –system jobs are submitted one by one to the system. From within the
batch, the jobs are processed one by one. A collection of jobs forms a batch (batch
processing) from which the jobs are executed one by one. Every user submits his/her job to
the operator who forms a batch of jobs. The entire system is used by one process at a time.
The sequence of steps is as follows:
1.All users submit the jobs to the operator ( the one who manages the system)
2.The operator selects similar kinds of jobs and makes batches.
3.Job1 from batch 1 is submitted for processing.
4.Job1 uses the CPU and I/O till it is completed. Till this time no other process can use the
CPU.
5.After job1 finishes job 2 is loaded into the memory.
• Disadvantages of batch processing/uni-programming:
1.Wastage of CPU time
2.No user interaction
3.No mechanism to prioritize processes
• In multi-programming more than one process can reside in the main
memory at a time. Thus, when process P1 goes for I/O operation the
CPU is not kept waiting and is allocated to some another process (lets
say P2). This keeps the CPU busy at all times.
• Advantages:
1.CPU is being utilized all the time as long as there are more than 1
process
2.The processes can be finished in less amount of time
• Disadvantages:
• 1. No user interaction
• Time Sharing (multi tasking) systems
• The concept of time sharing overcomes the problem of no user interaction as faced in
the above two strategies. Time sharing is the logical extension of multi programing.
In time sharing multiple jobs are executes at the same time and the CPU switches
among them so frequently that each user can interact with each program while it is
running. Time sharing system requires that each user be provided with input device
(keyboard or mouse) and an output device (monitor) to interact with the
systemdecreases the response time of the system for each user process. This gives
each user the illusion that the CPU is working solely for him/her.
• Advantages:
1.User interaction is possible
2.Multi-programming is possible
Uni-Programming Multi Programming Time Sharing
2. Only one process uses the entire 2. Multiple process can use system 2. Multiple process can use system
system resources at any given time resources at same time resources at same time