0% found this document useful (0 votes)
16 views37 pages

Operating System

An Operating System (OS) serves as an interface between users and computer hardware, managing essential tasks such as file, memory, and process management. Key functions of an OS include security, device management, and process scheduling, while it also supports various processing models like batch processing and multitasking. Open source software allows users to modify and share software freely, with notable examples including Linux.

Uploaded by

detito1579
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
16 views37 pages

Operating System

An Operating System (OS) serves as an interface between users and computer hardware, managing essential tasks such as file, memory, and process management. Key functions of an OS include security, device management, and process scheduling, while it also supports various processing models like batch processing and multitasking. Open source software allows users to modify and share software freely, with notable examples including Linux.

Uploaded by

detito1579
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 37

Operating System

Operating System
• An Operating System (OS) is an interface between a computer user
and computer hardware. An operating system is a software which
performs all the basic tasks like file management, memory
management, process management, handling input and output, and
controlling peripheral devices such as disk drives and printers.
• Some popular Operating Systems include Linux Operating System,
Windows Operating System, VMS, OS/400, AIX, z/OS, etc.
Operating System
• An operating system is a program that acts as an interface between
the user and the computer hardware and controls the execution of all
kinds of programs.
Importance of OS
• O/S provides the interface between the users and hardware.
• O/S allows to User Friendly Graphic Interface for all users because it provides various menus, buttons, icons,
and more for easy navigation
• No required any technical skills for operating GUI O/S.
• Cost effective.
• It has responsible for controlling and manipulate of all computer functions.
• These platforms are comfortable for all programs.
• It allows the best features such as “Plug and play”, means no need any drivers for using their devices like as
mouse, keyboard, and more.
• O/S uses numerous techniques such as memory segmentation, paging, and swapping. Operating system can
manage own memory with using those techniques.
• Operating System provides the assistance for managing the all input and output devices of computer system.
• Operating System can also manage all types of interrupts.
• O/S allows sharing one piece of data with many users.
• It also can share different resources like as Printer, Fax etc.
• O/S can be updated time by time without any hassle.
Functions
Important functions of an operating System.
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
Function
• Security: The operating system uses password protection to protect user data and similar
other techniques. it also prevents unauthorized access to programs and user data.
• Control over system performance: Monitors overall system health to help improve
performance. records the response time between service requests and system response
to having a complete view of the system health. This can help improve performance by
providing important information needed to troubleshoot problems.
• Job accounting: Operating system Keeps track of time and resources used by various tasks
and users, this information can be used to track resource usage for a particular user or
group of users.
• Error detecting aids: The operating system constantly monitors the system to detect
errors and avoid the malfunctioning of a computer system.
• Coordination between other software and users: Operating systems also coordinate and
assign interpreters, compilers, assemblers, and other software to the various users of the
computer systems.
Functions
• Memory Management : The operating system manages the Primary Memory or Main Memory. Main memory is made up
of a large array of bytes or words where each byte or word is assigned a certain address. Main memory is fast storage and
it can be accessed directly by the CPU. For a program to be executed, it should be first loaded in the main memory. An
Operating System performs the following activities for memory management: It keeps track of primary memory, i.e.,
which bytes of memory are used by which user program. The memory addresses that have already been allocated and the
memory addresses of the memory that has not yet been used. In multiprogramming, the OS decides the order in which
processes are granted access to memory, and for how long. It Allocates the memory to a process when the process
requests it and deallocates the memory when the process has terminated or is performing an I/O operation.
• Processor Management: In a multi-programming environment, the OS decides the order in which processes have access
to the processor, and how much processing time each process has. This function of OS is called process scheduling. An
Operating System performs the following activities for processor management. Keeps track of the status of processes. The
program which performs this task is known as a traffic controller. Allocates the CPU that is a processor to a process.
De-allocates processor when a process is no more required.
• Device Management : An OS manages device communication via their respective drivers. It performs the following
activities for device management. Keeps track of all devices connected to the system. designates a program responsible
for every device known as the Input/Output controller. Decides which process gets access to a certain device and for how
long. Allocates devices in an effective and efficient way. Deallocates devices when they are no longer required.
• File Management : A file system is organized into directories for efficient or easy navigation and usage. These directories
may contain other directories and other files. An Operating System carries out the following file management activities. It
keeps track of where information is stored, user access settings and status of every file, and more… These facilities are
collectively known as the file system.
Operating System Terminology
• Based in Processing model
• Batch Processing OS
• Multitasking/multiprogramming OS
• Time sharing OS
• Real time OS
• Multiprocessing OS
• Distributed OS
• On-line Processing
Operating System Terminology
• Based on Mode of User
• Single User OS
• Multiuser OS
• Based on User Interface
• GUI
• CUI
Batch processing
Batch processing is a technique in which an Operating System collects the programs and data together in a batch before processing starts.
An operating system does the following activities related to batch processing −
•The OS defines a job which has predefined sequence of commands, programs and data as a single unit.
•The OS keeps a number a jobs in memory and executes them without any manual information.
•Jobs are processed in the order of submission, i.e., first come first served fashion.
•When a job completes its execution, its memory is released and the output for the job gets copied into an output spool for later printing or processing.

Advantages
•Batch processing takes much of the work of the operator to the computer.
•Increased performance as a new job get started as soon as the previous job is finished, without any manual intervention.

Disadvantages
•Difficult to debug program.
•A job could enter an infinite loop.
•Due to lack of protection scheme, one batch job can affect pending jobs.
Multitasking
Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between them. Switches occur so frequently that the users may
interact with each program while it is running. An OS does the following activities related to multitasking −
•The user gives instructions to the operating system or to a program directly, and receives an immediate response.
•The OS handles multitasking in the way that it can handle multiple operations/executes multiple programs at a time.
•Multitasking Operating Systems are also known as Time-sharing systems.
•These Operating Systems were developed to provide interactive use of a computer system at a reasonable cost.
•A time-shared operating system uses the concept of CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared CPU.
•Each user has at least one separate program in memory.

•A program that is loaded into memory and is executing is commonly referred to as a process.
•When a process executes, it typically executes for only a very short time before it either finishes or needs to perform I/O.
•Since interactive I/O typically runs at slower speeds, it may take a long time to complete. During this time, a CPU can be utilized by another process.
•The operating system allows the users to share the computer simultaneously. Since each action or command in a time-shared system tends to be short,
•only a little CPU time is needed for each user.
•As the system switches CPU rapidly from one user/program to the next, each user is given the impression that he/she has his/her own CPU, whereas actually
•one CPU is being shared among many users.
Multiprogramming
Sharing the processor, when two or more programs reside in memory at the same time, is referred as multiprogramming.
Multiprogramming assumes a single shared processor. Multiprogramming increases CPU utilization by organizing jobs so
that the CPU always has one to execute. The following figure shows the memory layout for a multiprogramming system.

An OS does the following activities related to multiprogramming.


•The operating system keeps several jobs in memory at a time.
•This set of jobs is a subset of the jobs kept in the job pool.
•The operating system picks and begins to execute one of the jobs in the memory.
•Multiprogramming operating systems monitor the state of all active programs and system resources using memory
management programs
•to ensures that the CPU is never idle, unless there are no jobs to process.

Advantages
•High and efficient CPU utilization.
•User feels that many programs are allotted CPU almost simultaneously.

Disadvantages
•CPU scheduling is required.
•To accommodate many jobs in memory, memory management is required.
Spooling
Spooling is an acronym for simultaneous peripheral operations on line. Spooling refers to putting data of various I/O jobs in a
buffer. This buffer is a special area in memory or hard disk which is accessible to I/O devices.
An operating system does the following activities related to distributed environment −
•Handles I/O device data spooling as devices have different data access rates.
•Maintains the spooling buffer which provides a waiting station where data can rest while the slower device catches up.
•Maintains parallel computation because of spooling process as a computer can perform I/O in parallel fashion. It becomes
possible to have the computer read data from a tape, write data to disk and to write out to a tape printer while it is doing its
computing task.

Advantages
•The spooling operation uses a disk as a very large buffer.
•Spooling is capable of overlapping I/O operation for one job with processor operations for another job.
Process Management
• Process is the execution of a program that performs the actions
specified in that program. It can be defined as an execution unit
where a program runs. The OS helps you to create, schedule, and
terminates the processes which is used by CPU. A process created
by the main process is called a child process.
• Process management involves various tasks like creation,
scheduling, termination of processes, and a dead lock. Process is a
program that is under execution, which is an important part of
modern-day operating systems. The OS must allocate resources that
enable processes to share and exchange information. It also protects
the resources of each process from other methods and allows
synchronization among processes.
• It is the job of OS to manage all the running processes of the system.
It handles operations by performing tasks like process scheduling
and such as resource allocation.
Process States
Process States
• A process state is a condition of the process at a specific instant of time. It also defines the
current position of the process.

• New: The new process is created when a specific program calls from secondary memory/
hard disk to primary memory/ RAM a
• Ready: In a ready state, the process should be loaded into the primary memory, which is
ready for execution.
• Waiting: The process is waiting for the allocation of CPU time and other resources for
execution.
• Executing: The process is an execution state.
• Blocked: It is a time interval when a process is waiting for an event like I/O operations to
complete.
• Suspended: Suspended state defines the time when a process is ready for execution but
has not been placed in the ready queue by OS.
• Terminated: Terminated state specifies the time when a process is terminated
Process Scheduling
• The process scheduling is the activity of the process manager that handles the
removal of the running process from the CPU and the selection of another process
on the basis of a particular strategy.
• A Process Scheduler schedules different processes to be assigned to the CPU
based on particular scheduling algorithms. There are six popular process
scheduling algorithms which we are going to discuss in this chapter −
• First-Come, First-Served (FCFS) Scheduling
• Shortest-Job-Next (SJN) Scheduling
• Priority Scheduling
• Shortest Remaining Time
• These algorithms are either non-preemptive or preemptive. Non-preemptive
algorithms are designed so that once a process enters the running state, it cannot
be preempted until it completes its allotted time, whereas the preemptive
scheduling is based on priority where a scheduler may preempt a low priority
running process anytime when a high priority process enters into a ready state.
Deadlock
• Deadlock is a situation where a set of
processes are blocked because each
process is holding a resource and waiting for
another resource acquired by some other
process.

Consider an example when two trains are


coming toward each other on the same track
and there is only one track, none of the trains
can move once they are in front of each other.
A similar situation occurs in operating systems
when there are two or more processes that
hold some resources and wait for resources
held by other(s). For example, in the below
diagram, Process 1 is holding Resource 1 and
waiting for resource 2 which is acquired by
process 2, and process 2 is waiting for
resource 1.
Deadlock
Cause of Deadlock
• Mutual Exclusion: Two or more resources are non-shareable (Only one process can use at a time)
• Hold and Wait: A process is holding at least one resource and waiting for resources.
• No Preemption: A resource cannot be taken from a process unless the process releases the resource.
• Circular Wait: A set of processes are waiting for each other in circular form.
Methods for handling deadlock(3 Methods)
• Deadlock prevention or avoidance: The idea is to not let the system into a deadlock state. Prevention is done
by negating one of above mentioned necessary conditions for deadlock. Avoidance is kind of futuristic in
nature. By using strategy of “Avoidance”, we have to make an assumption. We need to ensure that all
information about resources which process will need are known to us prior to execution of the process. We use
Banker’s algorithm (Which is in-turn a gift from Dijkstra) in order to avoid deadlock.
• Deadlock detection and recovery: Let deadlock occur, then do preemption to handle it once occurred.
• Ignore the problem altogether: If deadlock is very rare, then let it happen and reboot the system. This is the
approach that both Windows and UNIX take.
GUI Based OS
• A visual environment that represent programs, files and options with
graphical images such as icon, menu and dialog boxes on screen is
GUI
Features
• Secondary input device
• Point and shoot functionality
• Graphical representation
• User friendliness
• Concept of windows
Working with windows environment
• Windows
• Menus
• List box
• Dialog box
• Button
• Scroll
• Scroll bar
• Drag and drop
• Minimizing, maximizing, cascading and close
Working with windows application program
• WordPad
• Paint
• Calculator
• Entertainment
• Notepad
• Address Book
• Outlook express
Manage file and folder with file explorer
• Files and folder can be created, rename, delete, copy and paste by
right clicking in it.

Customizing task bar


• A bar that contains start button and appears by default at bottom
of desktop is taskbar
• Installing programs
• Removing programs
• Manage password and Privacy
Use of accessories
• Backup
• Character Map
• Disk cleanup
• Disk fragmentation
• Device Manager
• Security Center
• System restore
Open source OS
The term open source refers to something people can modify and share
because its design is publicly accessible. It can be utilized and modified by
the end user without restriction.
What is open source software?
• Open source software is software with source code that anyone can
inspect, modify, and enhance.
• "Source code" is the part of software that most computer users don't ever
see; it's the code computer programmers can manipulate to change how a
piece of software—a "program" or "application"—works. Programmers
who have access to a computer program's source code can improve that
program by adding features to it or fixing parts that don't always work
correctly.
What’s the difference between free
software and open source?
• These are two terms that get confused with one another in practice,
and even get used as equivalents
• Open source is considered to have more flexible rules than free
software, since it allows companies and developers to impose certain
usage restrictions and licenses in order to protect the code’s integrity
• There is freedom to execute the code however one wishes and for
whatever purpose one wishes.
• The source code can be known and modified in its entirety.
• The code can be distributed freely (either without cost, or with a
charge).
• Modifications to the code can also be freely distributed (with or
without cost).
Examples of open source programs
Some widely used programs, platforms, and languages which are considered
open source are:
• Linux operating system
• Android by Google
• Open office
• Firefox browser
• VCL media player
• WordPress Content Management
Any person can access the code and modify it to create new extensions,
patches, or solutions. Linux, for example, is the example par excellence of
open source, and new programs can be created from its nucleus or kernel.
Advantages of open source
• The code can be known and modified to solve problems or can be
adapted to specific needs.
• An open source code remains in a state of constant improvement,
thanks to developer intervention, revision, and new ideas.
• Modifications to the code can be freely redistributed.
• Open source combats unethical software predation, monopoly, and
price-jacking.
• Open source promotes higher standards of quality.
What is UNIX?
• Unix is considered as the mother of most of the operating systems.
• The design of Unix systems is based on “Unix Philosophy” which includes
the following characteristics:
• Usage of plain text for data storage.
• Hierarchical file system.
• Handling devices and some specific kinds of inter-process communication
(IPC) as files.
• Employing a huge number of software tools.
• Multiple small, simple and modular programs which can be threaded
together via a command-line interpreter using pipes, contrasting to use a
single monolithic program which comprises of all the same functionality.
What is LINUX?
• Linux is not Unix, but it is a Unix-like operating system. Linux system is
derived from Unix and it is a continuation of the basis of Unix design.
Linux distributions are the most famous and healthiest example of
the direct Unix derivatives. BSD (Berkley Software Distribution) is also
an example of a Unix derivative.
• A Unix-like OS (also called as UN*X or *nix) is the one that works in a
way similar to Unix systems, however, it is not necessary that they
conform to Single UNIX Specification (SUS) or similar POSIX (Portable
Operating System Interface) standard.
Linux Distributions
• Other operating systems like Microsoft combine each bit of codes
internally and release it as a single package. You have to choose from
one of the version they offer.
• But Linux is different from them. Different parts of Linux are
developed by different organizations.
• Different parts include kernel, shell utilities, X server, system
environment, graphical programs, etc. If you want you can access the
codes of all these parts and assemble them yourself. But its not an
easy task seeking a lot of time and all the parts has to be assembled
correctly in order to work properly.
Distribution Why To Use
UBuntu It works like Mac OS and easy to
use.

Linux mint It works like windows and should


be use by new comers.
Debian It provides stability but not
recommended to a new user.
Fedora If you want to use red hat and
latest software.
Red hat enterprise To be used commercially.
CentOS If you want to use red hat but
without its trademark.
OpenSUSE It works same as Fedora but
slightly older and more stable.
Arch Linux It is not for the beginners
because every package has to be
installed by yourself.
Mobile Operating System
• A mobile operating system is an operating system that helps to run other
application software on mobile devices. It is the same kind of software as
the famous computer operating systems like Linux and Windows, but now
they are light and simple to some extent.
• The operating systems found on smartphones include Symbian OS, iPhone
OS, RIM's BlackBerry, Windows Mobile, Palm WebOS, Android, and
Maemo. Android, WebOS, and Maemo are all derived from Linux. The
iPhone OS originated from BSD and NeXTSTEP, which are related to Unix.
• It combines the beauty of computer and hand use devices. It typically
contains a cellular built-in modem and SIM tray for telephony and internet
connections. If you buy a mobile, the manufacturer company chooses the
OS for that specific device.
Popular platforms of the Mobile OS
1. Android OS: The Android operating system is the most popular operating system today. It is a mobile OS based on the Linux
Kernel and open-source software. The android operating system was developed by Google. The first Android device was launched
in 2008.
2. Bada (Samsung Electronics): Bada is a Samsung mobile operating system that was launched in 2010. The Samsung wave was
the first mobile to use the bada operating system. The bada operating system offers many mobile features, such as 3-D graphics,
application installation, and multipoint-touch.
3. BlackBerry OS: The BlackBerry operating system is a mobile operating system developed by Research In Motion (RIM). This
operating system was designed specifically for BlackBerry handheld devices. This operating system is beneficial for the corporate
users because it provides synchronization with Microsoft Exchange, Novell GroupWise email, Lotus Domino, and other business
software when used with the BlackBerry Enterprise Server.
4. iPhone OS / iOS: The iOS was developed by the Apple inc for the use on its device. The iOS operating system is the most popular
operating system today. It is a very secure operating system. The iOS operating system is not available for any other mobiles.
5. Symbian OS: Symbian operating system is a mobile operating system that provides a high-level of integration with
communication. The Symbian operating system is based on the java language. It combines middleware of wireless
communications and personal information management (PIM) functionality. The Symbian operating system was developed
by Symbian Ltd in 1998 for the use of mobile phones. Nokia was the first company to release Symbian OS on its mobile phone at
that time.
6. Windows Mobile OS: The window mobile OS is a mobile operating system that was developed by Microsoft. It was designed for
the pocket PCs and smart mobiles.
7. Harmony OS: The harmony operating system is the latest mobile operating system that was developed by Huawei for the use of
its devices. It is designed primarily for IoT devices.
8. Palm OS: The palm operating system is a mobile operating system that was developed by Palm Ltd for use on personal digital
assistants (PADs). It was introduced in 1996. Palm OS is also known as the Garnet OS.
9. WebOS (Palm/HP): The WebOS is a mobile operating system that was developed by Palm. It based on the Linux Kernel. The HP
uses this operating system in its mobile and touchpads.

You might also like