0% found this document useful (0 votes)
2 views22 pages

Batch Processing System

The document provides an overview of various types of operating systems, including their core functions, advantages, and disadvantages. It discusses batch processing, multiprogramming, multitasking, multiprocessing, and real-time operating systems, highlighting their operational characteristics and applications. Additionally, it covers the differences between symmetric and asymmetric multiprocessing, as well as the implications of multitasking on system performance and resource management.

Uploaded by

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

Batch Processing System

The document provides an overview of various types of operating systems, including their core functions, advantages, and disadvantages. It discusses batch processing, multiprogramming, multitasking, multiprocessing, and real-time operating systems, highlighting their operational characteristics and applications. Additionally, it covers the differences between symmetric and asymmetric multiprocessing, as well as the implications of multitasking on system performance and resource management.

Uploaded by

Arun51092
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ALAGAPPA CHETTIAR GOVERNMENT

COLLEGE OF ENGINEERING AND


TECHNOLOGY, KARAIKUDI

ASSIGNMENT 2

NAME: NAVEENA M
REG NO: 91762515037
DEPARTMENT: CSE
SUBJECT: Basic electrical, Electronics and instrumentation engineering
ALL TYPE OF OPERATING SYSTEM

An operating system (OS) is essential system software that manages a


computer's hardware, memory, and processes while providing a user
interface. It acts as an intermediary between users and computer
hardware, allowing applications to function. Key functions include CPU
scheduling, memory management, file management, and device
management.

Key Aspects of Operating Systems:


 Core Components: The kernel is the central component managing system
processes, alongside memory managers and process schedulers.
 Main Functions:
 Process Management: Scheduling tasks and CPU time.
 Memory Management: Tracking primary memory usage and allocating
space.
 Device Management: Controlling peripheral devices (printers, scanners)
via drivers.
 File Management: Organizing, storing, and retrieving files.
 Common Examples:
 Desktop: Microsoft Windows, mac OS, Linux.
 Mobile: Android, Apple IOS.
 Geeks for Geeks
 Geeks for Geeks
 +6
 Operating systems are crucial for ensuring that multiple programs can run
simultaneously without conflicts, managing resources efficiently, and
providing security.
Batch Processing System
 The OS in the early computers was fairly simple.
 Its major task was to transfer control automatically from one job to the
next.
 The OS was always resident in memory.
 To speed up processing, operators batched together jobs with similar
requirement/needs and ran them through the computer as a group. Thus,
the programmers would leave their programs with the operator.
 The operator would sort programs into batches with similar requirements
and, as the computer became available, would run each batch.
 The output from each job would be sent back to the appropriate
programmer.
Memory layout of Batch System
Advantages
➢Batch processing system is particularly useful for operations that require the
computer or a peripheral device for an extended period of time with very little
user interaction.
➢Increased performance as it was possible for job to start as soon as previous
job is finished without any manual intervention.
➢Priorities can be set for different batches. Disadvantages:
➢No interaction is possible with the user while the program is being executed.
➢ In this execution environment, the CPU is often idle, because the speeds of
the mechanical I/O devices are intrinsically slower than are those of electronic
devices.

Multiprogramming System

 The most important aspect of job scheduling is the ability to multi-


program.
 Multiprogramming increases CPU utilization by organizing jobs so that
CPU always has one to execute.

 The idea is as follows: The operating system keeps several jobs in


memory simultaneously. This set of jobs is a subset of the jobs kept in the
job-pool. Since the number of jobs that can be in the job pool.

 The operating system picks and begins to execute one of the jobs in the
memory.

 Eventually, the job may have to wait for some task, such as an I/O
operation, to complete.
 In a multiprogramming system, the OS simply switches to, and executes
another job. When that job needs to wait, the CPU is switched to another
job and so on. Eventually the first job finishes waiting and gets the CPU
back.

 As long as at-least one job needs to execute, the CPU is never idle.

 Multiprogramming is the first instance where the OS must make


decisions for the users (Making this decision is Job Scheduling).

 All the jobs that enter the system are kept in the job pool. This pool
consists of all processes residing on disk awaiting allocation of main
memory.

 If several jobs are ready to run at the same time, the system must choose
among them. Making this decision is job scheduling.

 Finally multiple jobs running concurrently require that their ability to


affect one another be limited in all phases of the operating system,
including process scheduling, disk storage and memory management.
 Multitasking System

 Technically, multitasking is same as multiprogramming.

 In a multitasking OS, a single user can execute multiple programs at


the same time.

 Multitasking is the system’s capability to work one or more than one


job or process at the same time. It means that whenever a job needs to
perform I/O operations, the CPU can be used for executing some other
job or process that is also residing in the system and is ready to use the
CPU.

 NOTE
1. The term multiprogramming is used for multi-user systems i.e., systems
that are simultaneously used by many users such as mainframe and server
class system. The term multitasking is used for single user system i.e.,
systems that are used by only one user at a time such as personal computer
or a notebook.
2. Thus multitasking is the method of processing the multiple tasks
concurrently in a single user system.

 For Example
A user is running separate program in 4 different windows at the same
time. The program in window 1 could be printing a document, he
program in window 2 could be displaying an e-mail of user, a
spreadsheet program in window 3 could be preparing sales report and
compilation of a program is in progress in window 4. in this manner, a
user may work on many tasks at the same time. Thus, progress of
different tasks can be viewed on different windows in a multitasking
system.

 There are two types of multitasking:


1. Cooperative Multitasking
2. Pre-emptive Multitasking

 Types of Multitasking System

1. Cooperative Multitasking.
In Cooperative Multitasking, a program can acquire the CPU for the
required amount of time. A program can share CPU with any other
program that is executing simultaneously.
2. Pre-emptive Multitasking.

In Pre-emptive Multitasking the OS allocates particular time to a


program. The CPU is preemptedif a higher priority job arrives in a
system.
S. No. Multiprogramming Multitasking
1. It is used for multi-user It is used for single user
systems i.e., the systems systems i.e., the systems
that are used by many that are used only by one
users at the same time. user a same time.
2. It refers to concurrent It refers to concurrent
execution of multiple execution of multiple jobs of
jobs that may be of same same user.
user or different users.

Multiprocessing/ Parallel/ Tightly Coupled System

 Most systems to date are single-processor systems; that is they


have only one main CPU. However, multiprocessor systems
( also known as parallel systems or tightly coupled systems )
are growing in importance.

 Such systems have more than one processor in close


communication, sharing the computer bus, the clock, and
sometimes memory and peripheral devices.

 Multiprocessor systems have three main advantages:

1. Increased throughput :
By increasing the number of processors, we hope more work done
in less time. The speed-up of N processors is not N; rather it is less
than N. When multiprocessors cooperate on a task, a certain amount
of overhead is incurred in keeping all the parts working correctly.
This overhead, plus contention for shared resources, lowers the
expected gain from additional processors.
2. Economy of Scale:

Multiprocessor systems can save more money than multiple single


processor systems, because they can share peripherals, mass storage,
and power supplies. If several programs operate on same set of data,
it is cheaper to store those data on one disk and to have all the
processors share them, than to have many computers with local disks
& many copies of the data.

3. Increased reliability.

If functions can be distributed properly among several processors,


then the failure of one processor will not halt the system, only slow
down it. If we have ten processors and one fails, then each of the
remaining nine processors must pick up a share of the work of the
failed processor. Thus, the entire system runs only 10 percent
slower, rather failing altogether. This ability to continue providing
service proportional to the level of surviving hardware is called
graceful degradation. Systems designed for graceful degradation are
also called fault tolerant.

Types of multiprocessor systems

1. Symmetric Multiprocessing
2. Asymmetric Multiprocessing

Differences between Symmetric and Asymmetric Multiprocessing


S. No Symmetric Multiprocessing Asymmetric Multiprocessing
1. In SMP, each processor runs an In ASMP, each processor is
identical copy of the OS, and assigned a specific task
these copies communicate with
one another as needed
2. SMP means that all processors A master processor controls
are peers; no master-slave the system; the other
relationship exists between processors either look to the
processors master for instruction or have
predefined tasks. This scheme
defines master-slave
relationship
3. Each processor concurrently The master processor
runs a copy of the operating schedules and allocates work
system. to the slave processors
MMIIRIC MULTIPROCESSING ASYMMETRIC MULTIPROCESSING
[Link] of programs by multiple [Link] of programs by multiple
processors that non operating share a processors that function according to
co system and memory the master-slave relationship
2. All the processors are treated [Link] are not treated equally
equally.
[Link] take processes from the [Link] processor assigns processes to
ready queue each processor can have the slave processors
separate ready queues
[Link] communicate with each [Link] communicate with the
other by the shared memory master processor
[Link] processors have the same [Link] can be different for each
architecture processor
[Link] as easy to design or handle [Link] to design and handle
[Link] costly [Link]

Comparison between Multiprogramming and Multiprocessing.


[Link] Multiprocessing Multiprogramming
1. Multiprocessing refers to Multiprogramming keeps several
processing of multiple programs in main memory at the
processes at same time by same time and execute them
multiple CPUs concurrently utilizing single CPU.
2. It utilizes multiple CPUs It utilizes single CPU.

3. It permits parallel processing Context switching takes place.

4. Less time taken to process More Time taken to process the jobs.
the jobs.
5. It facilitates much efficient Less efficient than multiprocessing.
utilization of devices of the
computer system
6. Usually more expensive. Such systems are less expensive

Multitasking operating system advantages


 A multitasking OS lets a computer run multiple processes seemingly at
the same time by quickly switching the CPU between them. Here's why
that matters:

 Better CPU utilization: The CPU doesn't sit idle while one program
waits for I/O like disk or network. It switches to another ready
process, so you get more work done per second.
 Increased throughput: More jobs finish in less time because
multiple programs progress together instead of running one-by-
one.
 Improved responsiveness: Your mouse, keyboard, and UI stay
responsive even if something heavy is running in the background.
The OS gives each app small time slices.
 Resource sharing: Multiple apps can share RAM, disk, printer, and
network without conflicts. The OS manages access and prevents
crashes.
 Convenience for users: You can browse, download files, play
music, and edit a document simultaneously without closing
anything.
 Supports background tasks: System services like antivirus scans,
updates, backups, and notifications run while you work on
foreground apps.
 Time sharing for multiple users: On servers, dozens of users can
log in and run programs at once. Each feels like they have the
whole machine.
 Easier program design: Developers don't have to write code to
manually pause and let other apps run. The OS handles scheduling.

 The trade-off is overhead from context switching and more complex


memory management, but for modern general-purpose computing the
benefits outweigh the cost.

Applications of multitasking operating systems

Where you’ll see multitasking OSs doing their thing:


 Personal computers & laptops: Windows, mac iOS, Linux let
you run Chrome, Spotify, Word, and Zoom all at once.
 Smartphones & tablets: Android and I OS keep Instagram,
Maps, music, and calls active while switching apps instantly.
 Servers & data centers: Unix/Linux servers handle thousands
of user requests, databases, and web services simultaneously.
 Real-time systems: Air traffic control, medical monitors, and
industrial robots use multitasking to handle sensors,
displays, and alerts together without delays.
 Embedded systems: Smart TVs, cars, and ATMs run UI,
networking, and payment processing as separate tasks under
an OS like QNX or Embedded Linux.
 Supercomputers: Scientific simulations split into thousands
of tasks that the OS schedules across cores to maximize
throughput.
 Virtualization & cloud: Hypervisors run multiple virtual
machines at once, each with its own OS and apps, all
managed by the host OS.

 Basically anywhere you need to do more than one thing at a time


without everything freezing.

Disadvantages of multitasking operating systems

 Running multiple processes at once comes with trade-offs:

 CPU overhead from context switching: The OS


constantly saves and loads process states. Too many
switches wastes CPU time that could do real work.
 Higher memory usage: Each running program needs
its own RAM space. More apps open = more RAM
consumed, which can cause slowdowns or swapping
to disk.
 Complexity: Scheduling, deadlocks, race conditions,
and resource conflicts make the OS harder to design
and debug.
 Reduced performance for heavy tasks: If 10 CPU-
hungry apps fight for time, each one runs slower than
if it had the CPU alone.
 Security & stability risks: A bug or crash in one
process can sometimes affect others. Malware in one
app can try to access shared resources.
 Harder real-time guarantees: Because CPU time is
shared, it’s tougher to guarantee a task finishes by an
exact deadline unless it’s a real-time OS.
 Increased power consumption: More active processes
keep the CPU busy, draining laptop/phone batteries
faster.
 Requires more powerful hardware: To feel smooth,
multitasking needs faster CPUs, more cores, and more
RAM vs. single-task systems.

 So multitasking is great for convenience, but it demands


more resources and careful OS design to avoid thrashing and
slowdowns.

Real-Time Operating Systems (RTOS)


 Areal-time operating system(RTOS) is an operating system(OS) intended
to serve real-time applications that process data as it comes in, typically
without buffer delays. Processing time requirements (including any OS
delay) are measured in tenths of seconds or shorter increments of time.

 Real time operating systems are generally special-purpose ones designed


to run embedded or specialized systems.

 These systems often operate in environments where there are significant


constraints on hardware design and often narrow tasks that need to be
done with great accuracy and speed.

 Real time systems are used in military, engineering, medical, and data
communications systems (among others).

 Example :
Typical examples of real-time systems include Air Traffic Control
Systems, Networked Multimedia Systems, Command Control Systems
etc.

Advantages:
 Better Throughput
 Time taken for response is less

Disadvantages:
 Very Costly
 Large memory required

Distributed/ Loosely coupled Systems

 Distributed Operating System is one of the important type of


operating system.

 Multiple central processors are used by Distributed systems to


serve multiple real-time applications and multiple users.
Accordingly, Data processing jobs are distributed among the
processors.

 Processors communicate with each other through various


communication lines (like high-speed buses or telephone lines).
These are known as loosely coupled systems or distributed
systems. Processors in this system may vary in size and function.
They are referred as sites, nodes, computers, and so on.

Advantages:

 With resource sharing facility, a user at one site may be able to use
the resources available at another.

 Speedup the exchange of data with one another via electronic mail.

 Failure of one site in a distributed system doesn’t affect the others,


the remaining sites can potentially continue operating.

 Better service to the customers.

 Reduction of the load on the host computer.

 Reduction of delays in data processing.


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 mainframe computer that has many users
logged on to it.

 Each user uses the resources of the mainframe-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.

 The time sharing systems were developed to provide an interactive use


of the computer system. A time shared system uses CPU scheduling and
multi-programming 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.

 The time-shared systems are more complex than the multi-programming


systems. In time-shared systems multiple processes are managed
simultaneously which requires an adequate management of main
memory so that the processes can be swapped in or swapped out within a
short time.

Handheld Systems

 Handheld systems include Personal Digital Assistants (PDA’s), such as


Palm OS, cellular telephones with connectivity to a network such as the
internet.
 Developers of handheld systems and applications face many challenges
most of which are due to the limited size of such devices.

 Ex: PDA

 First issue faced by programmer: Due to this limited size, most handheld
devices have a small amount of memory, include slow processors, and
feature small display screens.

 Many handheld devices have been limited size of memory.

 As a result, the OS and applications must manage memory efficiently.


This includes returning all allocated memory back to the memory manager
once the memory is no longer being used.

 Smartphones combine a mobile phone and a handheld computer into a


single device. Examples of smartphones over the years have included the
Apple iPhone, Samsung Galaxy, Microsoft and Nokia Lumia, Sony
Ericsson etc.,

 Second issue faced by programmer: Speed of processor

 Processor for most handheld devices often run at a fraction of the speed of
a processor in a PC.

 Third issue faced by programmer: Displaying the content in web pages in


we clipping where only a small subset of web page is delivered and
displayed on a handheld device.

You might also like