Operating System Tutorial

Operating System Tutorial Types of Operating System Evolution of Operating System Functions of Operating System Operating System Properties Operating System Services Components of Operating System Needs of the Operating System

Operating Systems

Linux Operating System Unix Operating System Ubuntu Operating System Chrome Operating Systems Fedora Operating System MAC Operating System MS Windows Operating System Solaris Operating System Cooperative Operating System CorelDRAW Operating System CentOS FreeBSD Operating Systems Batch Operating System MS-DOS Operating System Commercial Mobile Operating Systems


Difference Between Multi-programming and Multitasking Difference between C-LOOK and C-SCAN Difference between Rotational Latency and Disk Assess Time Trap vs Interrupt Difference between C-SCAN and SSTF Difference between SCAN and FCFS Difference between Seek Time and Disk Access Time Difference between SSTF and LOOK Difference between Process and Program in the Operating System Difference between Protection and Security in Operating System

How To

How to implement Monitors using Semaphores How to Install a Different Operating System on a PC


What is Kernel and Types of Kernel What is DOS Operating System What is Thread and Types of Thread What is Process Scheduler and Process Queue What is Context Switching What is CPU Scheduling What is Producer-Consumer Problem What is Semaphore in Operating System Monitors in Operating System What is Deadlock What is Paging and Segmentation What is Demand Paging What is Virtual Memory What is a Long term Scheduler What is Page Replacement in Operating System What is BSR Mode What is Convoy Effect What is Job Sequencing in Operating System Why is it critical for the Scheduler to distinguish between I/O-bound and CPU-bound programs Why is there a Need for an Operating System


Process Management Process State Scheduling Algorithm FCFS (First-come-First-Serve) Scheduling SJF (Shortest Job First) Scheduling Round-Robin CPU Scheduling Priority Based Scheduling HRRN (Highest Response Ratio Next) Scheduling Process Synchronization Lock Variable Mechanism TSL Mechanism Turn Variable Mechanism Interested Variable Mechanism Deadlock Avoidance Strategies for Handling Deadlock Deadlock Prevention Deadlock Detection and Recovery Resource Allocation Graph Banker’s Algorithm in Operating System Fixed Partitioning and Dynamic Partitioning Partitioning Algorithms Disk Scheduling Algorithms FCFS and SSTF Disk Scheduling Algorithm SCAN and C-SCAN Disk Scheduling Algorithm Look and C-Look Disk Scheduling Algorithm File in Operating System File Access Methods in Operating System File Allocation Method Directory Structure in Operating System N-Step-SCAN Disk Scheduling Feedback Queue in Operating System Contiguous Memory Allocation in Operating System Real-time Operating System Starvation in Operating System Thrashing in Operating System 5 Goals of Operating System Advantages of Operating System Advantages of UNIX Operating System Bit Vector in Operating System Booting Process in Operating System Can a Computer Run Without the Operating System Dining Philosophers Problem in Operating System Free Space Management in Operating System Inter Process Communication in Operating System Swapping in Operating System Memory Management in Operating System Multiprogramming Operating System Multitasking Operating Systems Multi-user Operating Systems Non-Contiguous Memory Allocation in Operating System Page Table in Operating System Process Scheduling in Operating System Segmentation in Operating System Simple Structure in Operating System Single-User Operating System Two Phase Locking Protocol Advantages and Disadvantages of Operating System Arithmetic operations in binary number system Assemblers in the operating system Bakery Algorithm in Operating System Benefits of Ubuntu Operating System CPU Scheduling Criteria in Operating System Critical Section in Operating System Device Management in Operating System Linux Scheduler in Operating System Long Term Scheduler in Operating System Mutex in Operating System Operating System Failure Peterson's Solution in Operating System Privileged and Non-Privileged Instructions in Operating System Swapping in Operating System Types of Operating System Zombie and Orphan Process in Operating System 62-bit operating system Advantages and Disadvantages of Batch Operating System Boot Block and Bad Block in Operating System Contiguous and Non - Contiguous Memory Allocation in Operating System Control and Distribution Systems in Operations Management Control Program in Operating System Convergent Technologies in Operating System Convoy Effect in Operating System Copy Operating Systems to SSD Core Components of Operating System Core of UNIX Operating System Correct Value to return to the Operating System Corrupted Operating System Cos is Smart Card Operating System Cosmos Operating Systems Examples Generation of Operating System Hardware Solution in Operating System Process Control Block in Operating System Function of Kernel in Operating System Operating System Layers History of Debian Operating Systems Branches and Architecture of Debian Operating Systems Features and Packages of Debian Operating Systems Installation of Operating System on a New PC Organizational Structure and Development in Debian Operating Systems User Interface in Operating System Types Of Memory in OS Operating System in Nokia Multilevel Paging in OS Memory Mapping Techniques in OS Memory Layout of a Process in Operating System Hardware Protection in Operating System Functions of File Management in Operating System Core of Linux Operating System Cache Replacement Policy in Operating System Cache Line and Cache Size in Operating System

What is Time-Sharing Operating System


An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a crucial component of the system software in a computer system.

Batch Operating system is one of the important types of operating system.

Users using a batch operating system do not interact with the computer directly. Each user prepares their job on an off-line device like a punch card and submits it to the computer operator. Jobs with similar needs are batched together and run as a group to speed up the processing. The programmers exit their programs with the operator, and the operator then sorts the programs with similar requirements into batches.

The following are the issues that arise with batch systems:

  • The user and the task are not interacting with each other.
  • Due to the mechanical I/O devices' slower speed than the CPU, the CPU is frequently idle.
  • It is challenging to assign the appropriate priority.

Types of Operating Systems

The following are the various kinds of operating systems:

  • Batch Operating System
  • Multiprogramming Operating System
  • Time Sharing Operating System
  • Multiprocessing Operating System
  • Real-time Operating System

Let's talk about the Time-Sharing Operating System now.

Time-Sharing operating system

An operating system design known as time-sharing permits several users or processes to simultaneously use the same system resources, including the CPU, memory, and peripherals. It makes it possible for every user or process to appear as though they have exclusive access to the system while efficiently sharing resources in a time-sliced fashion.

User interaction with computer systems was impossible with multiprogrammed, batch systems, but they offered an environment where different system resources were used efficiently. A natural progression from multiprogramming is time-sharing. Interaction between the user and each running program is possible because the CPU switches between many tasks so frequently. Several people can share computers at once with a time-shared operating system. Because the shared system shrinks with each action or order, each user only needs a small amount of CPU time. Even though several users share the computer system, each user gets the impression that it is exclusively theirs as the system quickly flips between them.

Each user of a time-shared operating system is given access to a small portion of the shared computer simultaneously through CPU scheduling and multi-programming. In memory, every user possesses a minimum of one distinct program. An application is loaded into memory and runs for a brief amount of time, either to finish the I/O or to reach its conclusion. Quantum, time slice, and time slot are terms used to describe this brief time window when the user receives CPU attention. The usual duration is between 10 and 100 milliseconds. Comparing multiprogrammed and time-shared operating systems, the latter are simpler. Memory management and security are necessary since numerous tasks must be maintained while running in parallel. Jobs may need to switch in and out of the disc from the main memory, which is now used as a backup store for the main memory, to get a good response time. Virtual memory, a technique that enables the execution of a job that might not be entirely in memory, is a popular way to accomplish this goal.

Three key states of Time-Sharing Operating System

Below is a list of the three critical states of the time-sharing operating system.

  • Active State: When a process is actively using the CPU, it is said to be active. Only one process can be in the active state at a time because the CPU can only be assigned to one process for processing at a time.
  • Ready State: A process that is ready to run and is awaiting a CPU assignment is referred to as being in the "ready state." Even though multiple processes can exist simultaneously in the ready state, only one will ever use the CPU to process data.
  • Waiting State: In a state known as "waiting," processes are those that are not ready to run just yet and are waiting for an input/output process to finish. When the input/output process is complete, it leaps to the ready state, ready to be executed.
What is Time-Sharing Operating System

In the above figure, user 5 is in an active state, while users 1, 2, 3, and 4 are waiting, and user 6 is in a ready state.

In the active state, the CPU controls the user's program. In this state, there is only one programme offered.

Ready State: The user program is prepared to run and merely awaits its CPU turn. Multiple users can be in a ready state simultaneously.

The user's program is waiting while it awaits an input or output operation. Multiple users can be in a waiting state simultaneously.

Multiprogramming and CPU scheduling are two concepts used by time-sharing operating systems. The operating system can accomplish multiple tasks simultaneously by constantly switching the processor between multiple programs.

If the system contains three processes, P1, P2, and P3, the operating system will force the processor to run each process briefly until an input or output request is received. We call this brief window of time when the user has the CPU's focus "quantum," "time slice," or "time slot." Usually, it takes between ten and one hundred milliseconds. Each process thus uses the processor for a certain amount of time, and this cycle is continued until every process is finished. CPU scheduling determines which processes will receive the CPU in what order.

Another important thing to keep in mind is that the processor switches between processes so quickly that we are unable to determine which one is running at any given time. It seems as though every process is happening at the same time.  

Examples of time-sharing operating systems

For instance, all processor types in a transaction processing system can complete every user program in a brief computational burst. For example, if n users exist, each user can obtain a time quantum.

The following are a few instances of time-sharing operating systems:

  • UNIX
  • Multics
  • Linux
  • Windows 2000 server
  • Windows NT server
  • TOPS-10 (DEC)
  • TOPS-20 (DEC)

Requirements for Time-Sharing OS

The Time-Sharing Operating System needs an alarm clock that triggers the CPU with an interrupt signal after each time slice. A memory protection mechanism keeps data and instructions from one job from affecting others.

Two of the most important features of a time-sharing operating system are its ability to support many users simultaneously and speed up user response times overall. Additionally, time-sharing operating systems might be more affordable for businesses because they allow multiple users to use the system without requiring separate licence purchases.

Features of Time Sharing operating system

  • Every user allocates a specific amount of time for every operation.
  • The same computer can be used concurrently by several online users.
  • End users consider themselves to be in total control of the computer system.
  • There is an improvement in user-computer interaction.
  • Responses to user inquiries may come back quickly.
  • Waiting for the previous task to finish before using the processor is no longer necessary.
  • It can complete a lot of tasks quickly.

Advantages of Timesharing operating systems

  • It provides the advantage of quick response.
  • This type of operating system avoids duplication of software.
  • It reduces CPU idle time.

Disadvantages of Time-sharing operating systems are

  • Time-sharing has the problem of reliability.
  • Questions of security and integrity of user programs and data can be raised.
  • The problem of data communication occurs.

Key Takeaways

Multi-programmed operating systems are less complicated than time-shared operating systems. In both cases, multiple jobs must be held in memory at the same time. Time-sharing is a logical extension of multiprogramming; under this operating system, several users/processes are assigned computer resources in time slots. Because the processor's time is shared across several users, it is a time-sharing operating system. As a result, memory management and security are required in the system.

Multiprogramming and time-sharing would be hard to implement without interrupts. A busy wait would be needed so that one job could not run while another was waiting for I/O. Time slices cannot be formed to divide the CPU among jobs without a timer interrupt. Interrupts must be coordinated with one another.

The next natural step after multiprogramming is time sharing. Many users/processes are allotted IT resources in different time slots under this time-sharing operating system.

Multiple people split up the processor's time. That's the reason it's called a time-sharing OS. A CPU in each user's terminal can be used for this purpose by two or more people. Within an OS that shares time, there is a set time slice. In an OS system that shares resources, executive power is turned off before the end of execution. Here, the time required for each process is the same or less. The operating system uses the available time to switch between processes in time-sharing. Within the system model of the time-sharing system, there are numerous users and applications. The time-sharing scheme optimises response time.