Multiprogramming Operating System
Multiprogramming is a variation of batch processing in which the CPU is kept busy at all
times. CPU time and IO time are two forms of system time required by each process. When a
process completes its I/O in a multiprogramming environment, the CPU can begin the
execution of other processes. As a result, multiprogramming helps in improving the system’s
efficiency.
What is the Multiprogramming Operating System?
On a single processor computer, a multiprogramming OS can run many programs. In a
multiprogramming OS, if one program must wait for an input/output transfer, the other
programmes are ready to use the CPU. As a result, different jobs may have to split CPU time.
However, their jobs are not scheduled to be completed at the same time.
When software is run, it is referred to as a “Task,” “Process,” or “Job.” When compared to
serial or batch processing systems, concurrent program executions reduce system resource
usage and increase throughput.
Multiprogramming’s main purpose is to manage all of the system’s resources. The file
system, transient area, command processor, and I/O control system are the main components
of a multiprogramming system. As a result, the multiprogramming OS is built to store many
programs based on sub-segmenting the transient area. The operating system’s essential
functions are tied to the resource management processes.
Multiprogramming Operating System Types
Multiprogramming operating systems are divided into two categories, and they are:
Multitasking Operating System
A multitasking OS allows two or more programmes to run simultaneously. This is
accomplished by the operating system transferring each program into or out of memory one
by one. When a program is switched out of the memory, it is saved on the disc temporarily
until it is needed again.
Multiuser Operating System
A multiuser operating system allows multiple users from various terminals to share the
processing time on a certain powerful central machine. The operating system achieves this by
frequently switching between terminals, each of which is allotted a certain amount of
processor time on a central computer. Because the operating system on each terminal changes
so frequently, each user appears to have constant access to the central computer. When a
system has a large number of users, the time it takes for the central computer to respond
becomes more apparent.
Multiprogramming Operating System Working
In the multiprogramming system, multiple users can complete their tasks at the same time,
and they can be saved in the main memory. While a programme is performing I/O operations,
the CPU may distribute time to other applications while in idle mode.
While one application waits for an I/O transfer, another is always ready to use the processor,
and multiple programmes may share CPU time. Although not all tasks are executed at the
same time, there may be multiple jobs operating on the processor at the same time, with parts
of other processes first being executed, followed by another segment, and so on. As a result, a
multiprogramming system’s overall purpose is to keep the CPU busy unless and until some
tasks in the job pool become available. As a result, a single processor computer may run
multiple programmes, and the CPU is never idle.
Multiprogramming Operating System Examples
Download software, transfer data, Google Chrome, MS-Excel, Firefox browser, and many
other apps are instances of multiprogramming operating systems. Other operating systems
include Windows, UNIX, and microcomputers like MP/M, XENIX, and DESQview.
Pros of Multiprogramming Operating System
The multiprogramming OS has a number of advantages. The following are some of them:
It has a faster response time.
It may be beneficial to run multiple jobs in a single application at the same time.
It aids in the computer’s overall optimization of job throughput.
The multiprogramming system can be used by multiple people at the same time.
In comparison to long-term work, short-term jobs are completed swiftly.
It may aid in reducing turnaround time for short-duration tasks.
It contributes to higher CPU utilisation and is never idle.
The resources are wisely allocated.
Cons of Multiprogramming Operating System
The multiprogramming OS has a number of drawbacks. The following are some of them:
It’s quite complex and sophisticated.
CPU scheduling is necessary.
Since all types of tasks get stored in the main memory, memory management is
required in the operating system.
The more difficult challenge is managing all procedures and tasks.
Long-term jobs will demand a long wait if it has a high number of jobs.
Multitasking Operating System
The multitasking OS refers to a logical extension of the multiprogramming operating system,
which allows users to run many programs simultaneously. It enables a user to complete
multiple computer tasks at the same time.
What is the Multitasking Operating System?
In a modern computer system, the word “multitasking” is employed. It’s a logical extension
of the multiprogramming system that allows numerous applications to run simultaneously.
Multitasking in an OS enables a user to execute multiple computer tasks at the same time.
Processes that hold common processing resources, such as a CPU, are known as many tasks.
The operating system remembers where you are in these jobs and lets you switch between
them without data being lost.
Although early operating systems could run multiple programs at once, multitasking was not
completely supported. As a result, a single piece of software might use the entire CPU of the
computer to complete a task. The user was unable to do other operations, such as opening and
shutting windows, because basic operating system capabilities, such as file copying, were
disabled. Because modern OS provide comprehensive multitasking, multiple programs can
run simultaneously without interfering with one another. Furthermore, many OS processes
can operate concurrently.
Types of Multitasking OS
Preemptive
Preemptive multitasking is a task that a computer operating system is given. It determines
how much time one job spends on the operating system before assigning another process to
use it. The operating system is also referred to as ‘preemptive’ because it controls the entire
operation.
Desktop operating systems employ proactive multitasking. Unix was the first OS to
implement this multitasking technique. The first versions of Windows to implement
preemptive multitasking were Windows NT and Windows 95. The Macintosh gained
proactive multitasking in OS X. When it’s time for another application to take over the CPU,
this operating system instructs the programs.
Cooperative
Cooperative multitasking is referred to as ‘Non-Preemptive Multitasking.’ The basic goal of
cooperative multitasking is to complete the current work while allowing another process to
execute. taskYIELD is used to complete this task (). Context-switch is called whenever the
taskYIELD() function is called.
Cooperative multitasking was utilised by Windows and MacOS. When a Windows program
receives a message, it will perform some short unit of work before giving the CPU over to the
OS until it receives another message. It operated flawlessly as long as all applications were
bug-free and written with other programs in mind.
Pros of Multitasking OS
Manage several users
This OS is more suited to support several users at the same time, and multiple apps can
operate smoothly without slowing down the system.
Virtual memory
Multitasking operating systems have the best virtual memory system. Any program does not
need a long wait time to perform its tasks because of virtual memory; if this problem arises,
then those applications are shifted to virtual memory.
Good reliability
Multitasking operating systems provide multiple users more flexibility, which makes them
happier. Besides, each user can run one or more apps at the same time.
Secured memory
Memory management is well-defined in multitasking operating systems. Because of this, the
operating system does not grant any permission for unwanted apps to waste RAM.
Time shareable
To avoid having to wait for the CPU, each task is given a specific length of time.
Background processing
Background processes can operate more efficiently under a multitasking operating system.
Most users are unaware of these background processes, although they aid the smooth
operation of other programs such as antivirus software, firewalls, and others.
Optimise the computer resources
A multitasking OS can manage I/O devices, RAM, hard discs, CPUs, and other computer
resources.
Use several programs
Users can run multiple programs at the same time, such as games, an internet browser,
Microsoft PowerPoint, Excel, and other utilities.
Cons of Multitasking OS
Processor boundation
Because of the modest pace of its processors, the system may run applications slowly, and
their reaction time may increase when processing many programs. More computing power is
necessary to solve this challenge.
Memory boundation
The computer’s performance may suffer as a result of many programs running at the same
time, as the main memory becomes overcrowded when multiple programs are loaded.
Reaction time grows since the CPU is unable to give distinct times for each program. The
usage of low-capacity RAM is the primary cause of this problem. As a result, the capacity of
the RAM can be increased to meet the requirements.
CPU heat up
In a multitasking environment, numerous processors are busier at the very same time to finish
any task; therefore, the CPU generates more heat. pes of Operatinystem
Operating systems assist in resolving the small computer difficulties by providing insight into
the computer’s inner workings. It functions as a resource manager, managing all of the OS’s
files, memory, and processes with the help of the user’s coding abilities. By acting as an
interface between programs, it improves communication between processes. Hence, having a
basic understanding of OS is required.
What are the Types of Operating Systems?
An OS refers to a collection of well-organised applications that manage computer hardware.
It is a form of system software which is responsible for the computer system’s flawless
operation.
There are basically eight types of Operating Systems. Here are all the types of OS along with
their pros and cons:
1. Batch Operating System
Batch processing was quite popular in the 1970s. Similar types of jobs have been batched
together and completed on time using this method. People were very much accustomed to
utilising a single computer, known as a mainframe.
Now, more than one individual can have access to this Operating System, and they can
submit their jobs to the system for execution. The system places all of the jobs in a queue,
first come, first served, and then executes them one at a time. When all of the jobs are
completed, the users receive their respective outputs.
The fundamental goal of this Operating System was to transfer the control from one of the
jobs to another as soon as it was finished. It had a small group of programs known as the
resident monitor. These were always contained in one section of the main memory. The
remaining portion is used for maintenance work.
Pros of Batch OS
The usage of a resident monitor helps in increasing the computer efficiency by reducing the
time the CPU spent switching between two tasks.
Cons of Batch OS
Not Interactive: Batch Processing is not appropriate for jobs that rely on user input. Because
the user is not present at the time of execution, a job that demands the input of two numbers
from the console will never obtain it in the batch processing scenario.
Starvation: The batch processing suffers from a lack of resources.
Consider the following scenario:
In the batch, there are five jobs and they are J1, J2, J3, J4, and J5. In case J1 takes a
considerably long time to execute, the other four tasks will either never be executed or will
have to wait a long time. As a result, the other processes suffer.
2. Multiprogramming Operating System
Multiprogramming is a variation of batch processing in which the CPU is kept busy at all
times. CPU time and IO time are two forms of system time required by each process. When a
process completes its I/O in a multiprogramming environment, the CPU can begin the
execution of other processes. As a result, multiprogramming helps in improving the system’s
efficiency.
Pros of Multiprogramming OS
It increases the job throughput of the system since the CPU continually runs one program. It
is also possible to shorten response times since the resources are used pretty smartly.
Cons of Multiprogramming OS
Multiprogramming systems create an environment in which multiple system resources are
efficiently utilised, but they do not allow for any user interaction with the computer.
3. Multiprocessing Operating System
Multiprocessing helps in performing parallel computing. There are several processors in a
system, each of which can run multiple processes at the same time. The system’s throughput
will be significantly increased as a result of this.
Parallel computing is performed by multiprocessing. The presence of more than one
processor in the system allows it to run multiple processes at the same time, increasing the
system’s throughput.
Pros of Multiprocessing OS
Increased reliability: Processing duties can be spread among numerous processors in the
multiprocessing system. This improves reliability because if one processor happens to fail,
the work can be passed on to another to finish.
Increased throughout: More jobs can be performed in less time as the number of processors
increases.
Cons of Multiprocessing OS
Because it manages multiple CPUs at the same time, a multiprocessing OS is more complex
and advanced.
4. Multitasking Operating System
The multitasking OS refers to a logical extension of the multiprogramming Operating
System, which allows users to run many programs at the same time. It enables a user to
complete multiple computer tasks at the same time.
Pros of Multitasking OS
This Operating System is better adapted to handling several users at the same time. Memory
management is well-defined in multitasking Operating Systems.
Cons of Multitasking OS
In a multitasking environment, numerous processors are busy at the same time to finish any
task; therefore, the CPU generates more heat.
5. Network Operating System
A Network OS is a type of Operating System that incorporates software and protocols for
communicating with other computers over a network in a convenient and cost-effective
manner.
Pros of Network OS
Because clients and servers are separated in this Operating System, network traffic is
reduced. Setting up and maintaining this type of system is less expensive.
Cons of Network OS
The failure of a node in a system impacts the entire system in this form of the Operating
System. Security and performance are critical considerations; as a result, network
administration requires qualified network administrators.
6. Real-Time Operating System
In this type of system, each job has a deadline by which it must be completed; otherwise,
there will be a significant loss, or even if the output is provided, it will be utterly useless. For
example, in military applications, if you wish to drop a missile, the missile must be dropped
with a specific degree of precision.
Pros of Real-Time OS
Under the real-time OS, it’s simple to design, create, and run real-time applications. The
maximum use of devices and systems is possible with a real-time Operating System.
Cons of Real-Time OS
The development of real-time Operating Systems is extremely expensive. Real-time
Operating Systems are quite complex and can eat up a lot of CPU time.
7. Time-Sharing Operating System
The Time-Sharing OS provides computer resources to numerous programs at the same time
in a time-dependent manner. As a result, it aids in providing direct access to the main
computer to a large number of users. It’s a natural progression from multiprogramming. The
CPU is swapped between numerous programs provided by the different users in time-sharing
on a scheduled basis.
Because a time-sharing OS allows multiple users to be served at the same time, it necessitates
sophisticated CPU scheduling algorithms and input/output management. Building time-
sharing Operating Systems are complex and expensive.
Pros of Time-Sharing OS
The time-sharing OS allows for efficient resource use and sharing. The CPU idle time and
response time are reduced using this technology.
Cons of Time-Sharing OS
In comparison to other technologies, data transmission rates are extremely high.
As numerous users access a system at the same time, the security and integrity of user
programs loaded in memory and data must be maintained.
8. Distributed Operating System
The Distributed OS is separated into sections and loaded on different machines rather than
being placed on a single machine. Each machine has a piece of the distributed OS installed to
allow them to communicate. Because they must deal with a variety of networking protocols,
distributed Operating Systems are far more sophisticated, massive, and complex than network
Operating Systems.
Pros of Distributed OS
The distributed OS allows resources to be shared. This system is designed to be fault-tolerant.
Cons of Distributed OS
The cost of computing can be dominated by protocol overhead.