0% found this document useful (0 votes)
4 views

Introduction to Operating Systems and Solved Problems

An operating system (OS) manages computer hardware and software resources, acting as an intermediary between users and the system. Operating systems can be categorized by user access (single-user vs. multi-user), task handling (single-tasking vs. multi-tasking), and processing style (batch vs. interactive). Key components of an OS include process management, memory management, file system management, and CPU scheduling, which allocates CPU resources among processes using various algorithms.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Introduction to Operating Systems and Solved Problems

An operating system (OS) manages computer hardware and software resources, acting as an intermediary between users and the system. Operating systems can be categorized by user access (single-user vs. multi-user), task handling (single-tasking vs. multi-tasking), and processing style (batch vs. interactive). Key components of an OS include process management, memory management, file system management, and CPU scheduling, which allocates CPU resources among processes using various algorithms.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Introduction to Operating Systems

I. Introduction
An operating system (OS) is a System Software that used to manage and control the
use of various computer's hardware and software resources. It acts as an intermediary
between user of a computer system and computer hardware, providing a platform for running
applications and performing tasks.

Operating systems can be categorized into several types, including:

 Single-user vs. Multi-user: In a single-user operating system, only one user can
access the computer at a time, whereas in a multi-user operating system, multiple
users can access the computer simultaneously, with each user having their own
account, settings, and permissions.
Example for Single-User Operating Systems:

1. MS-DOS (Microsoft Disk Operating System): An old operating system that


only allowed one user to access the computer at a time.
2. Windows 3.x: An early version of Windows that only supported a single user.
3. DOS: Disk Operating System, an old operating system that only allowed one
user to access the computer at a time.

Example for Multi-User Operating Systems:

1. Unix: A operating system that allows multiple users to access the computer
simultaneously, with each user having their own account and permissions.
2. Linux: A popular operating system that is a variant of Unix, and also
supports multiple users.
3. Windows NT/2000/XP/Vista/7/8/10: Modern versions of Windows that
support multiple user accounts, with each user having their own desktop and
settings.
4. Mac OS X: The operating system used by Apple computers, which also
supports multiple user accounts.
5. Mainframe operating systems: Such as z/OS, OS/390, and VSE, which are
designed for large-scale computing environments with multiple users.
 Single-tasking vs. Multi-tasking: Single-tasking OS allows running only one program at
a time, whereas multi-tasking OS allows running multiple programs concurrently.

Single-Tasking:

 MS-DOS: Only one program can run at a time. If you want to run another
program, you need to exit the current one first.
 Older video game consoles: Some older gaming consoles like the original
Nintendo Entertainment System (NES) could only run one game at a time.
You had to restart the console to play a different game.

Multi-Tasking:
 Windows: You can have multiple programs open simultaneously, such as a
web browser, word processor, and music player.
 Mobile devices: Modern smartphones and tablets allow you to have multiple
apps open at the same time, such as browsing the web while listening to
music and receiving notifications.
 Unix/Linux: These operating systems are designed for multi-tasking and can
run multiple programs simultaneously, making them popular for servers and
development environments.
Batch Processing vs. Interactive Systems: Batch processing OS executes jobs in batches
without user interaction, while interactive OS allows user interaction during execution. Here
are some examples to illustrate the difference between batch processing and interactive
systems:
Batch Processing:
 Payroll processing: A company's payroll is processed in a batch, where all
employee data is collected and processed at once, generating pay checks and
reports.
 Bank transactions: Banks process transactions in batches, such as processing
all debit card transactions at once, rather than individually.
 Scientific simulations: Researchers may run complex simulations in batches,
processing large datasets overnight or over several days.
Interactive Systems:
 Web browsing: You interactively request web pages, and the browser
responds immediately, displaying the content.
 Gaming: Games respond to your inputs in real-time, allowing interactive
gameplay.
 Word processing: You interactively type and edit documents, with the
software responding immediately to your inputs.
In batch processing, tasks are executed in a sequence, without user interaction, whereas in
interactive systems, users interact with the system in real-time, receiving immediate
responses. Batch processing is often used for tasks that don't require user input or feedback,
while interactive systems are used for tasks that require user engagement and immediate
feedback.

Common types of operating systems include:


1. Desktop OS: designed for personal computers, such as Windows, macOS, and Linux.
2. Mobile OS: designed for mobile devices, such as Android and iOS.
3. Server OS: designed for servers, such as Windows Server, Linux, and Unix.
4. Real-Time OS: designed for applications requiring predictable and fast processing,
such as embedded systems.
5. Embedded OS: designed for specific hardware platforms, such as consumer
electronics and appliances.
Various Components of a Computer Systems includes,
 Process Management manages the creation, execution, and termination of processes
(programs) running on the computer.
 Memory Management: manages the allocation and deallocation of memory for
running programs.
 File System Management: provides access to and manages files and directories on
storage devices like hard drives, solid-state drives, and flash drives.
 Input/Output (I/O) Management: manages input from devices like keyboards,
mice, and scanners, and output to devices like monitors, printers, and speakers.
 Security: provides mechanisms for controlling access to computer resources, such as
user authentication, access control, and encryption.
 Networking: manages communication between the computer and other devices on a
network, such as servers, printers, and other computers.
 Interrupt Handling: handles interrupts generated by hardware devices, such as
keyboard presses or disk completion.
 Resource Allocation: manages the allocation and deallocation of system resources,
such as CPU time, memory, and I/O devices.
CHAPTER 2. CPU SCHEDULING
Introduction
CPU Scheduling means allocating CPU resources among all the processes in fair
manner is called CPU Scheduling. In a single processor system, there is only one available
CPU, and this may be wanted by multiple processes or programs in the time-sharing
operating systems. When all the programs or processes requesting one CPU at the same time,
it is the responsibility of the operating system to allocate the CPU among the processes using
some algorithms called CPU scheduling algorithms to satisfies all the process needs.
In general, the CPU scheduling algorithms are classified into two categories namely
1. Non-Preemptive CPU Scheduling algorithms
2. Preemptive CPU Scheduling algorithms
 Non-Preemptive CPU Scheduling algorithms
Once the CPU is given to the process for execution, then the CPU can’t be taken from
that process until that process completed its execution is called Non-Preemptive CPU
scheduling algorithm.
 Preemptive CPU scheduling
Even if the CPU is given to the process for execution, the CPU can be taken from that
process before the currently running process completed its execution is called Preemptive
CPU scheduling algorithm.

You might also like