Operating System
Operating System
Operating System
Dr Debarpita Santra
Assistant Professor I
Amity Institute of Information Technology Kolkata
Amity University Kolkata
2
DEFINITION
• An Operating System (OS) manages all other applications and programs in a computer, and it
is loaded into the computer by a boot program.
• The kernel is the software that contains the operating system’s core components.
• To run other programmes, every computer has to have at least one operating system installed.
3
Windows, Linux, Android are examples of operating systems that enable the user to use
programs like MS Office, Notepad, Games, Browsers on the computer or mobile
phone.
4
CORE FUNCTIONS OF OS
• Managing hardware resources: An operating system manages resources such as
CPU, memory, and disk space, and assigns these resources to running applications.
FUNCTIONS OF OS
• Processor Management: An operating system manages the processor’s work by
allocating various jobs to it and ensuring that each process receives enough time
from the processor to function properly.
• Device Management: There are various input and output devices. An OS controls
the working of these input-output devices. It receives the requests from these
devices, performs a specific task, and communicates back to the requesting process.
6
FUNCTIONS OF OS (CONTINUED…)
• File Management: An operating system keeps track of information regarding the
creation, deletion, transfer, copy, and storage of files in an organized way. It also
maintains the integrity of the data stored in these files, including the file directory
structure, by protecting against unauthorized access.
• Security: The operating system provides various techniques which assure the
integrity and confidentiality of user data. Following security measures are used to
protect user data:
FUNCTIONS OF OS (CONTINUED…)
• Error Detection: From time to time, the operating system checks the system for any
external threat or malicious software activity. It also checks the hardware for any
type of damage. This process displays several alerts to the user so that the
appropriate action can be taken against any damage caused to the system.
• Windows: Microsoft Windows is the most popular desktop operating system, used
by over 1 billion users worldwide. It has a wide range of features and applications,
including the Office suite, gaming, and productivity tools.
• macOS: macOS is the desktop operating system used by Apple Mac computers. It is
known for its clean, user-friendly interface, and is popular among creative
professionals.
• Linux: Linux is an open-source operating system that is available for free and can be
customized to meet specific needs. It is used by developers and businesses, as well
as individuals who prefer an open-source, customizable operating system.
10
FEATURES OF OS
• Provides a platform for running applications
• Handles memory management and CPU scheduling
• Provides file system abstraction
• Provides networking support
• Provides security features
• Provides user interface
• Provides utilities and system services
• Supports application development
11
COMPONENTS OF OS
• Shell
• Kernel
• Shell handles user interactions. It is the outermost layer of the OS and manages the
interaction between user and operating system by:
•Prompting the user to give input
•Interpreting the input for the operating system
• Handling the output from the operating system.
• Shell provides a way to communicate with the OS by either taking the input from the
user or the shell script.
• A shell script is a sequence of system commands that are stored in a file.
KERNEL
12
• All other components of the OS rely on the core to supply them with essential services.
• It serves as the primary interface between the OS and the hardware and aids in the
control of devices, networking, file systems, and process and memory management.
• When an OS is loaded into memory, the kernel is loaded first and remains in memory
until the OS is shut down.
• Kernel also sets up the memory address space for applications, loads the files with
application code into memory, and sets up the execution stack for programs.
13
KERNEL
14
FUNCTIONS OF KERNEL
• Input-Output management
• Memory Management
• Process Management for application execution
• Device Management
15
TYPES OF OS
• Batch OS
• Distributed OS
• Multitasking OS
• Network OS
• Real Time OS
16
BATCH OS
• The OS takes up similar jobs and groups them together into a batch, and then these batches are
executed one by one based on the first-come, first, serve principle.
• Advantages of Batch OS
• Multiple users can share batch systems.
• Managing large works becomes easy in batch systems.
• The idle time for a single batch is very less.
• Disadvantages of OS
•It is hard to debug batch systems.
•If a job fails, then the other jobs have to wait for an unknown time till the issue is
resolved.
•Batch systems are sometimes costly.
• Examples of Batch OS: payroll system, bank statements, data entry, etc.
17
DISTRIBUTED OS
• In a distributed OS, various computers are connected through a single
communication channel.
• These independent computers have their memory unit and CPU and are known as
loosely coupled systems.
• The system processes can be of different sizes and can perform different functions.
• The major benefit of such a type of operating system is that a user can access files
that are not present on his system but in another connected system.
• In addition, remote access is available to the systems connected to this network.
18
DISTRIBUTED OS (CONTINUED…)
Advantages of Distributed OS
• Failure of one system will not affect the other systems because all the computers are
independent of each other.
• The load on the host system is reduced.
• The size of the network is easily scalable as many computers can be added to the
network.
• As the workload and resources are shared therefore the calculations are performed at
a higher speed.
19
DISTRIBUTED OS (CONTINUED…)
Disadvantages of Distributed OS
• The setup cost is high.
• Software used for such systems is highly complex.
• Failure of the main network will lead to the failure of the whole system.
MULTITASKING OS 20
• The multitasking OS is also known as the time-sharing operating system as each task
is given some time so that all the tasks work efficiently.
• This system provides access to a large number of users, and each user gets the time
of CPU as they get in a single system.
• The time allotted to execute one task is called a quantum, and as soon as the time to
execute one task is completed, the system switches over to another task.
MULTITASKING OS (CONTINUED…)
21
• Advantages of Multitasking OS
•Each task gets equal time for execution.
•The idle time for the CPU will be the lowest.
•There are very few chances for the duplication of the software.
• Disadvantages of Multitasking OS
•Processes with higher priority cannot be executed first as equal priority is given
to each process or task.
•Various user data is needed to be taken care of from unauthorized access.
•Sometimes there is a data communication problem.
NETWORK OS
• Network operating systems are the systems that run on a server and manage all the
networking functions.
• They allow sharing of various files, applications, printers, security, and other
networking functions over a small network of computers like LAN or any other
private network.
• In the network OS, all the users are aware of the configurations of every other user
within the network, which is why network operating systems are also known as
tightly coupled systems.
23
NETWORK OS (CONTINUED…)
• Advantages of Network OS
•New technologies and hardware can easily upgrade the systems.
•Security of the system is managed over servers.
•Servers can be accessed remotely from different locations and systems.
•The centralized servers are stable.
• Disadvantages of Network OS
•Server costs are high.
•Regular updates and maintenance are required.
• Users are dependent on the central location for the maximum number of operations.
• Examples of Network OS: Microsoft Windows server 2008, LINUX, etc.
REAL TIME OS
24
• Real-Time operating systems serve real-time systems. These operating systems are useful when
many events occur in a short time or within certain deadlines, such as real-time simulations.
• Hard real-time OS
• The hard real-time OS is the operating system for mainly the applications in which the
slightest delay is also unacceptable.
• The time constraints of such applications are very strict.
• Such systems are built for life-saving equipment like parachutes and airbags, which
immediately need to be in action if an accident happens.
• Soft real-time OS
• The soft real-time OS is the operating system for applications where time constraint is not
very strict.
• In a soft real-time system, an important task is prioritized over less important tasks, and
this priority remains active until the completion of the task.
• Furthermore, a time limit is always set for a specific job, enabling short time delays for
future tasks, which is acceptable. For Example, virtual reality, reservation systems, etc.
REAL TIME OS (CONTINUED…) 25
• Advantages of Real-Time OS
•It provides the best management of memory allocation.
•These systems are always error-free.
•These operating systems focus more on running applications than those in the queue.
•Shifting from one task to another takes very little time.
• Disadvantages of Real-Time OS
•System resources are extremely expensive and are not so good.
•The algorithms used are very complex.
•Only limited tasks can run at a single time.
•In such systems, we cannot set thread priority as these systems cannot switch tasks
easily.
• Examples of Real-Time OS: Medical imaging systems, robots, etc.
26