Real-time Operating System
- In a real time operating system (RTOS), a job is to be completed within the rigid time constraints otherwise job loses its meaning.
- A real time system functions correctly only if it returns the correct result within its time constraints.
- Thus, in a real-time system, the correctness of the computation not only depends upon the logical correctness of the computation but also upon the time at which the result is produced.
- Thus, a real time system is one that must react to inputs and respond to them quickly. It cannot afford to be late with a response to an event.
- A real time system is often used as a central device in a dedicated applications like fuel- injection system, robotics, air-traffic control, medical imaging systems, systems that control scientific experiment, industrial control system and weapon systems, traffic light system, radar system and telephone switching system.
- Thus, providing quick response times is the main objective of real-time system, However, resource utilization and user convenience are of secondary concern.
Timesharing Operating System
- Timesharing refers to the allocation of computer resources in a time dependent fashion to several programs simultaneously.
- A timesharing system has many user terminals that are connected to same computer simultaneously. Using these terminal, different users can work on a system at the same time.
- Thus, it uses multiprogramming with a special CPU scheduling algorithm to achieve this. In timesharing system, the CPU time is divided among all the users on a scheduled basis.
- Each user program is allocated a very short period of CPU time one-by-one, beginning from the first user program and proceeding the last one, and then again beginning from the first one.
- This short period of time during which user gets the attention of the CPU is known as a time slice, time slot or quantum. It is typically of the order of 10 to 100 milliseconds.
- Thus, in timesharing, when the CPU is allocated to a user program, the user uses the CPU for the period of time slot.
It releases the CPU under any of the following three conditions :
- When the allotted time slice expires.
- When the program needs to perform I/O operation
- When the execution of the program is over during the time slice.
Difference between Real-Time Operating System and Timesharing Operating System
Real-Time Operating System
Timesharing Operating System
|1.||A real time operating system has well defined fixed time constraints. Process must be done within the defined constraints or system will fail.||The time sharing system executes one job up to certain period of time and then switches to another job and so on.|
|2.||Certain operating system features like job scheduling, memory swapping have limited use.||Concepts like job scheduling, memory swapping are used for handling timesharing systems.|
|3.||It executes one job dedicatedly.||It seems to execute many jobs at the same time.|
|4.||Real time operating system enables us to program an application with predictable results.||It is impossible to predict response in advance in timesharing system.|
|5.||Real-time operating systems give users the ability to prioritize tasks so that the most critical task can always take control of the process when needed.||In timesharing system, high priority tasks can be preempted by lower priority tasks, making it impossible to guarantee a response time for your critical applications|