LECTURE NOTES
on
OPERATING SYSTEM
(ICS-401)
2023 – 2024
B. Tech IIIrd Sem e s t e r
Mr. Deepanshu Singh Yadav, Assistant Profes so r
Ms. Diksha Sharma, Assistant Profes so r
Sitapur Road, Lucknow
Uttar Pradesh
India
Pin Code :226021
INSTITUTE OF ENGINEERING
&TECHNOLOGY
Department of Computer Science and
Engineering
Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW
Page 1
Ms.Diksha Sharma, Assistant Professor ,IET,LUCKNOW
REFERENCES :
1. Silberschatz, Galvin and Gagne, “Operating Systems Concepts”, Wiley
2. Harvey M Dietel, “ An Introduction to Operating System”, Pearson Education
3. William Stallings, “Operating Systems: Internals and Design Principles ”, 6th
Edition, Pearson Education
4. D M Dhamdhere, “Operating Systems : A Concept based Approach”, 2nd Edition
5. Sibsankar Halder and Alex A Aravind, “Operating Systems”, Pearson Education
6. Rajiv Chopra, “ Operating System a Practical approach”, S.Chand
7. I.A.Dhotre, “Operating System”,Technical Publications.
8. codeforwin.org/
9. https://www.prepbytes.com/
10. Tutorials point
Disclaimer: The e-content is exclusively meant for academic purposes and for enhancing
teaching and learning. Any other use for economic/commercial purpose is strictly
prohibited. The users of the content shall not distribute, disseminate or share it with anyone
else and its use is restricted to advancement of individual knowledge. The information
provided in this e-content is developed from authentic references, to the best of my
knowledge.
Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW
Page 1
Ms.Diksha Sharma, Assistant Professor ,IET,LUCKNOW
Time Sharing Operating System?
A time sharing operating system is that it is a type of computer operating system that allows multiple users to
interact with a single computer system at the same time. The OS achieves this by dividing the CPU time,
memory, and other resources of the computer among different users, allowing each user to perform their tasks
independently as if they were the sole user of the system.
In other words, in an interactive system, many users directly interact with the computer from terminals
connected to the computer.
Processor’s time which is shared among multiple users simultaneously is termed is time sharing
Time sharing is a logical extension of multiprogramming os. The processor time is shared between multiple
users at a time. The processor allows each user program to execute for small time quantum.
How does a Time Sharing Operating System Work?
Computers can be simultaneously shared by users this functionality is provided by the time sharing operating
system.
Now, let’s see the working of the time sharing operating system.
The amount of CPU time allotted to each process is divided when a user performs multiple tasks.
Each process can only run for a set amount of time at once. The minimum time quantum is between 10 and
100 milliseconds. Time slot or time slice are other names for time quantum.
Let’s take an example to understand how the time sharing operating system work:
• Four processes P1, P2, P3, and P4 are running on the operating system.
• Let’s assume we have a fixed quantum time for each process is 5 nanoseconds. Now, we will see how all the
processes will execute.
• First, process P1 will be executed for 5 nanoseconds.
• After 5 nanoseconds of process P1 are completed, process P2 will be executed for the next 5 nanoseconds.
• After 5 nanoseconds of process P2 are completed, process P3 will be executed for the next 5 nanoseconds.
• After 5 nanoseconds of process P3 are completed, process P4 will be executed for the next 5 nanoseconds.
• The above process will continue until all processes are completed.
In the above example, Process 3 is in the Active State and Process 4 is in the Ready State. However, Process
5, Process 6, Process 1, and Process 2 are in the Waiting State.
Three Important States of the Time Sharing Operating System:
The three crucial states of the time sharing operating system are listed below.
• Active State: It’s referred to as being in an active state when a process is actively using the CPU. As the CPU
can only be allocated to one process at a time for processing, only one process can be in an active state.
• Ready State: The term "Ready state" refers to a process that is prepared for execution and is awaiting the
assignment of a CPU. Although more than one process can be in the Ready state at once, only one of them
will ever receive the CPU to process data.
• Waiting State: Processes that are not yet prepared for execution and are awaiting the conclusion of an
input/output process are referred to as being in a waiting state. The process jumps to the Ready state after the
input/output process is finished and is then prepared to be executed.
Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW
Page 1
Ms.Diksha Sharma, Assistant Professor ,IET,LUCKNOW
Examples of Time Sharing Operating Systems:
Let’s take an example of any transaction processing system, it take only a small quantum of time for processors
to execute every user program. Every user is capable of grabbing the time quantum.
Some of the examples of time sharing operating systems are:
• Linux
• UNIX
• Windows NT Server
• TOPS-20(DEC)
• TOPS-10(DEC)
• Windows 2000 server
• Multics
Challenges to the Time Sharing Operating System:
There are several challenges attached to the time sharing operating system:
• Resource allocation and management: The operating system must allocate and manage system resources
efficiently to ensure that each process has access to the resources it needs
• User interactivity: Time sharing operating systems must provide a responsive and interactive user
experience, with a minimal response time for user commands.
• Resource contention: In a time-sharing system, multiple processes are competing for system resources, and
this can lead to resource contention. For example, two processes may try to access the same file or device
simultaneously, leading to conflicts and potential data corruption.
• Security: Time sharing operating systems must ensure the security of user data and prevent unauthorized
access to system resources. This includes protecting user data from other users on the system and ensuring
that processes do not interfere with each other.
• Overhead: The implementation of time-sharing requires additional overhead, such as the overhead associated
with context switching and process scheduling. This can impact system performance and reduce overall
system throughput.
Advantages of the Time Sharing Operating System:
There are many advantages of using the time sharing operating system:
• Multiple users and processes can share system resources like CPU time, memory, and I/O devices thanks to
time sharing operating systems, which can increase resource utilization and cut down on waste.
• Multiple users can work on the same system concurrently with time sharing operating systems, which can
improve teamwork and increase user productivity.
• Time sharing operating systems give priority to user requests and fairly distribute CPU time, which can speed
up system response time and give users a more interactive experience.
• Operating systems that share resources can eliminate the need for multiple physical systems, which can lower
hardware costs and free up space in data centers.
Disadvantages of the Time Sharing Operating System:
There are a few disadvantages that come with the use of the time sharing operating system:
• In a time sharing operating system, multiple processes are competing for system resources, and this can lead
to resource contention.
• Time sharing operating systems could be exposed to security risks like malware attacks, unauthorized access,
and data breaches.
• Time sharing operating systems are more complicated than single-user systems because they must control
numerous concurrent users and processes.
Mr. Deepanshu Singh Yadav , Assistant Professor ,IET,LUCKNOW
Page 1
Ms.Diksha Sharma, Assistant Professor ,IET,LUCKNOW