0% found this document useful (0 votes)
84 views7 pages

1.2 DIfferent Types of Operating System and Its Services

The document discusses different types of operating systems and operating system services. It describes: 1. Types of operating systems including batch, multiprogramming, multitasking, real-time, time-sharing, and multithreading operating systems. 2. Operating system services from the user point of view including program execution, I/O operations, file system manipulation, communication, and error detection. 3. Operating system services from the system point of view including resource allocation, accounting, and protection.

Uploaded by

Darshit Chhatbar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views7 pages

1.2 DIfferent Types of Operating System and Its Services

The document discusses different types of operating systems and operating system services. It describes: 1. Types of operating systems including batch, multiprogramming, multitasking, real-time, time-sharing, and multithreading operating systems. 2. Operating system services from the user point of view including program execution, I/O operations, file system manipulation, communication, and error detection. 3. Operating system services from the system point of view including resource allocation, accounting, and protection.

Uploaded by

Darshit Chhatbar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Q – 1 What are different types of Operating System

1. Batch Operating System

• In earlier days, computers were large machines. The common input devices were card
readers and tape drives.
• The common output devices were tape drives and printers.
• The OS was very simple and always resident in main memory.
• Programmers would prepare a job and submit it to the operator. The job was consisted of
programs and data.
• Operator would make batch by collecting multiple jobs and as computer became available,
run them batch wise.
• At some later time, output appeared. The output consisted of the result of program and
error information if any.

• Programmers needed to wait during this time and then collect output from operator.

Job
Input Output
(Batch of Jobs) OS

• Memory is divided into two parts. It is shared between job and OS.
• At a time one job is selected from the batch of jobs and is loaded in memory for execution.
• Once its execution completes, another job will be selected and loaded in memory for
execution.
• This procedure will continue until all the jobs in a batch get executed.

Disadvantages:

• Low throughput because CPU remains idles when I/O is going on.
• Programmers do not have direct interaction with job.
• Debugging is possible only offline after output appears.
• Operations were too much time consuming.

2. Multiprogramming Operating System

• A multiprogramming system permits multiple programs to be loaded into main memory


and executes them concurrently.
• OS multiplexes computer resources among these jobs.
• For example, when one job requests for I/O operation, the CPU will be free and it can be
allocated to other job. Thus multiprogramming creates logical parallelism.
• Here more than one job (process) can be loaded in memory simultaneously.

• Primary goal of such system is to keep CPU always busy.


• For example one process for coping and another process for downloading.
• In multiprogramming user interaction is not possible when process is running.
• OS requires following features to provide multiprogramming.
• Job scheduling: system must choose among several jobs in pool to load in main memory.
• Memory management: system must allocate memory to several jobs.
• Device allocation: devices should be allocated to different jobs as per their requirement.

Advantage:

• Higher throughput because CPU remains always busy.


Disadvantage:

• No user interaction: programmers do not have direct interaction with jobs


3. Multitasking Operating System

• Multitasking is logical extension of multiprogramming OS.


• The concept of multitasking is quite similar to multiprogramming. But the main difference
is that this OS provide user interaction while process is running.
• In this OS switching between jobs occur so frequently.
• This process is also known as ‘Task switching’.
• Practically all modern OS has this facility.
• For example you open Microsoft word and excel or PowerPoint.
• Two most common methods for sharing the CPU time are:

1. Co-operative or non-preemptive multitasking:

• The simplest form of multitasking is co-operative multitasking it lets the programs decide
when they wish to let other task run.
• This method is not good since it lets one process use the CPU never let other processes
run.

2. Preemptive multitasking:

• It moves the control of CPU to the OS letting each process to run for a given amount of time
and then switching to another task.
• This is most common today.

4. Real Time Operating System (RTOS)

• It is a one kind of OS particularly useful in embedded systems.


• In such type of OS time is key parameter.
• Here input immediately affects the output. Time is very critical.
• System having such type of characteristics systems to control nuclear power plants, oil
refining, chemical processing and air traffic control system.
• All these operation must occur within some time limits.
• There are two types of RTOS:
1. Hard Real Time System:

• All critical tasks must get completed strictly within specified time limits
• For example system which controls operation of oil refinery.

2. Soft Real Time System:

• It is less strict for time. Missing an occasional deadline is acceptable.


• For example digital audio or multimedia system.

5. Time Sharing Operating System

• A time sharing system allows many users to share the computer resources simultaneously.
• In other words, time sharing refers to the allocation of computer resources in time slots to
several programs simultaneously. For example a Server computer that has many users
logged on to it.
• Each user uses the resources of the server -i.e. memory, CPU etc. The users feel that they are
exclusive user of the CPU, even though this is not possible with one CPU i.e. shared among
different users.
• A time shared system uses CPU scheduling and multiprogramming to provide each user with
a small portion of a time-shared computer.
• It allows many users to share the computer resources simultaneously. As the system
switches rapidly from one user to the other, a short time slot is given to each user for their
executions.
• The time sharing system provides the direct access to a large number of users where CPU
time is divided among all the users on scheduled basis.
• The OS allocates a set of time to each user. When this time is expired, it passes control to the
next user on the system.
• The time allowed is extremely small and the users are given the impression that they each
have their own CPU and they are the sole owner of the CPU.
• This short period of time during that a user gets attention of the CPU; is known as a time
slice or a quantum. The concept of time sharing system is shown in figure.
• Generally, time sharing operating system is used when a powerful server computer serves
several client computers.

• In above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state
whereas user 6 is in ready status.
• As soon as the time slice of user 5 is completed, the control moves on to the next ready
user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in waiting state and user 1
is in ready state. The process continues in the same way and so on.
• The time-shared systems are more complex than the multi-programming systems.

6. Multithreading Operating System

• A thread of execution is the smallest sequence of programmed instructions that executed


independently
• Thread is an execution unit which consists of its own program counter, a stack, and a set of
registers. Threads are also known as Lightweight processes
• Multithreading OS supports the concept of multiple threads within single process
environment.
• Sometimes a single application needs to perform more than one task simultaneously.
• For example Microsoft word needs to accept input and provide spell check.
• There are different threads in single process which perform these different tasks
simultaneously.
• One thread may accept input while other may provide spell checking.
• Operating system which provides such functionality is known as multithreading OS.
Q - 2 What are different Operating System Services?

• OS services can be described from two different points of view.

1) User Point of View Services

➢ Program execution
• Main purpose of OS is to provide an efficient and convenient environment for
Execution of programs so an OS must provide various functions for loading a program into
main memory executes it and after execution terminates it.
➢ I/O Operation
• A running program needs I/O operation s for reading input data and for outputting result.
• This I/O may be with a file or a device.
• User can’t control I/O devices directly for security reasons so OS provides services for I/O
operations.
➢ File System Manipulation
• OS provides file system manipulation functionalities like create, read, write and delete a
file.
➢ Communication
• In multitasking environment more than one process is running
simultaneously.
• Sometime there is a need of exchanging information among processes. Such
processes may be on the same machine or on the different machines. OS
provides inter process communication for this.
➢ Error detection
• Error may be in user programs, CPU and memory hardware or in I/O devices.
• OS detects such errors and makes user aware from them. It also provides
some error recovery mechanism.

2) System Point of View Services

➢ Resource allocation
• When multiple users are sharing same machine or when multiple jobs are
runningsimultaneously, there is a need of fair allocation of resources among
them. OS does this.
➢ Accounting
• It is the process of keeping information about which user or process uses
which resourceand for what duration of time.
• OS provides accounting.
➢ Protection
• OS ensures that all access to system resources is controlled and also
provides securityfeatures.

You might also like