0% found this document useful (0 votes)
37 views12 pages

Operating System by Kirandeep

An operating system manages computer hardware and software resources and provides common services to programs. It acts as an intermediary between programs and computer hardware. Key components of an operating system include the kernel, which provides basic control of hardware; program execution services; interrupt handling; and memory management to allocate memory to programs independently. Popular operating systems include Windows, macOS, Android, iOS, and Linux distributions.

Uploaded by

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

Operating System by Kirandeep

An operating system manages computer hardware and software resources and provides common services to programs. It acts as an intermediary between programs and computer hardware. Key components of an operating system include the kernel, which provides basic control of hardware; program execution services; interrupt handling; and memory management to allocate memory to programs independently. Popular operating systems include Windows, macOS, Android, iOS, and Linux distributions.

Uploaded by

Harjot Hunjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

OPERATING SYSTEM

WHAT IS AN OPERATING SYSTEM?


• An operating system (OS) is system software that manages computer hardware, software resources, and provides common 
services for computer programs.
• Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting software for
cost allocation of processor time, mass storage, printing, and other resources.
• For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between
programs and the computer hardware,[1][2] although the application code is usually executed directly by the hardware and
frequently makes system calls to an OS function or is interrupted by it. Operating systems are found on many devices that
contain a computer – from cellular phones and video game consoles to web servers and supercomputers.
• The dominant desktop operating system is Microsoft Windows with a market share of around 76.45%. macOS by Apple Inc. is
in second place (17.72%), and the varieties of Linux are collectively in third place (1.73%).[3] In the mobile sector (including
smartphones and tablets), Android's share is up to 72% in the year 2020.[4] According to third quarter 2016 data, Android's
share on smartphones is dominant with 87.5 percent with also a growth rate of 10.3 percent per year, followed by Apple's iOS
 with 12.1 percent with per year decrease in market share of 5.2 percent, while other operating systems amount to just 0.3
percent.[5] Linux distributions are dominant in the server and supercomputing sectors. Other specialized classes of operating
systems, such as embedded and real-time systems, exist for many applications.
TYPES OF OPERATING SYSTEM
SINGLE-TASKING AND MULTI –TASKING.
A single-tasking system can only run one program at a time, while a multi-tasking operating system
allows more than one program to be running in concurrency. This is achieved by time-sharing, where the
available processor time is divided between multiple processes. These processes are each interrupted
repeatedly in time slices by a task-scheduling subsystem of the operating system. Multi-tasking may be
characterized in preemptive and co-operative types. In preemptive multitasking, the operating system
slices the CPU time and dedicates a slot to each of the programs. Unix-like operating systems, such as 
Solaris and Linux—as well as non-Unix-like, such as AmigaOS—support preemptive multitasking.
Cooperative multitasking is achieved by relying on each process to provide time to the other processes in
a defined manner. 16-bit versions of Microsoft Windows used cooperative multi-tasking; 32-bit versions
of both Windows NT and Win9x used preemptive multi-tasking.
• SINGLE AND MULTI TASKER. Single-user operating systems have no
facilities to distinguish users, but may allow multiple programs to run in
tandem.[6] A multi-user operating system extends the basic concept of multi-
tasking with facilities that identify processes and resources, such as disk
space, belonging to multiple users, and the system permits multiple users to
interact with the system at the same time. Time-sharing operating systems
schedule tasks for efficient use of the system and may also include
accounting software for cost allocation of processor time, mass storage,
printing, and other resources to multiple users.
• DISTRIBUTEDA distributed operating system manages a group of
distinct, networked computers and makes them appear to be a single
computer, as all computations are distributed (divided amongst the
constituent computers).[7]
• TEMPLATED In the distributed and cloud computing context of an
OS, templating refers to creating a single virtual machine image as a guest
operating system, then saving it as a tool for multiple running 
virtual machines. The technique is used both in virtualization and cloud
computing management, and is common in large server warehouses.[8]
• EMBEDDEDEmbedded operating systems are designed to be
used in embedded computer systems. They are designed to
operate on small machines with less autonomy (e.g. PDAs). They
are very compact and extremely efficient by design, and are able
to operate with a limited amount of resources. Windows CE and 
Minix 3 are some examples of embedded operating systems
• LIBRARY –A library operating system is one in which the services that a
typical operating system provide, such as networking, are provided in the
form of libraries and composed with the application and configuration
code to construct a unikernal : a specialized, single address space,
machine image that can be deployed to cloud or embedded environments.
COMPONENTS
• The components of an operating system all exist in order to make the different parts of a
computer work together. All user software needs to go through the operating system in
order to use any of the hardware, whether it be as simple as a mouse or keyboard or as
complex as an internet component.
• KERNEL –with the aid of the firmware and device drivers,the kernel provides the most
basic level of control over all of the computer’s hardware devices. It manages memory
access for programs in the ram, it determines which programs get access to which
hardware resoures , it sets up or resets the CPU’s operating states for optimal operation at
all times, and it organizes the data for long-term non-volatile storage with file systems on
such media as disks,tapes,flash memory etc.
• PROGRAM EXECUTION The operating system provides an interface
between an application program and the computer hardware, so that an
application program can interact with the hardware only by obeying rules
and procedures programmed into the operating system. The operating
system is also a set of services which simplify development and execution
of application programs. Executing an application program involves the
creation of a process by the operating system kernel which assigns
memory space and other resources, establishes a priority for the process in
multi-tasking systems, loads program binary code into memory, and
initiates execution of the application program which then interacts with
the user and with hardware devices.
• INTERRUPTS Interrupts are central to operating systems, as they provide an efficient way for the operating system to
interact with and react to its environment. The alternative – having the operating system "watch" the various sources of
input for events (polling) that require action – can be found in older systems with very small stacks (50 or 60 bytes) but
is unusual in modern systems with large stacks. Interrupt-based programming is directly supported by most modern
CPUs. Interrupts provide a computer with a way of automatically saving local register contexts, and running specific
code in response to events. Even very basic computers support hardware interrupts, and allow the programmer to
specify code which may be run when that event takes place.
• When an interrupt is received, the computer's hardware automatically suspends whatever program is currently running,
saves its status, and runs computer code previously associated with the interrupt; this is analogous to placing a
bookmark in a book in response to a phone call. In modern operating systems, interrupts are handled by the operating
system's kernel. Interrupts may come from either the computer's hardware or the running program.
• When a hardware device triggers an interrupt, the operating system's kernel decides how to deal with this event,
generally by running some processing code. The amount of code being run depends on the priority of the interrupt (for
example: a person usually responds to a smoke detector alarm before answering the phone). The processing of
hardware interrupts is a task that is usually delegated to software called a device driver, which may be part of the
operating system's kernel, part of another program, or both. Device drivers may then relay information to a running
program by various means.
• A program may also trigger an interrupt to the operating system. If a program wishes to access hardware, for example,
it may interrupt the operating system's kernel, which causes control to be passed back to the kernel. The kernel then
processes the request. If a program wishes additional resources (or wishes to shed resources) such as memory, it
triggers an interrupt to get the kernel's attention
• MEMORY MANAGEMENT
Among other things, a multiprogramming operating system kernel must be responsible for managing all system memory which is
currently in use by programs. This ensures that a program does not interfere with memory already in use by another program. Since
programs time share, each program must have independent access to memory.
• Cooperative memory management, used by many early operating systems, assumes that all programs make voluntary use of the  
kernel's memory manager, and do not exceed their allocated memory. This system of memory management is almost never seen any
more, since programs often contain bugs which can cause them to exceed their allocated memory. If a program fails, it may cause
memory used by one or more other programs to be affected or overwritten. Malicious programs or viruses may purposefully alter
another program's memory, or may affect the operation of the operating system itself. With cooperative memory management, it
takes only one misbehaved program to crash the system.
• Memory protection enables the kernel to limit a process' access to the computer's memory. Various methods of memory protection
exist, including memory segmentation and paging. All methods require some level of hardware support (such as the 80286 MMU),
which doesn't exist in all computers.
• In both segmentation and paging, certain protected mode registers specify to the CPU what memory address it should allow a
running program to access. Attempts to access other addresses trigger an interrupt which cause the CPU to re-enter  supervisor mode,
placing the kernel in charge. This is called a segmentation violation or Seg-V for short, and since it is both difficult to assign a
meaningful result to such an operation, and because it is usually a sign of a misbehaving program, the kernel generally resorts to
terminating the offending program, and reports the error.
• Windows versions 3.1 through ME had some level of memory protection, but programs could easily circumvent the need to use it.
A general protection fault would be produced, indicating a segmentation violation had occurred; however, the system would often
crash anyway.
• VIRTUAL MEMORYThe use of virtual memory addressing (such as paging or segmentation) means
that the kernel can choose what memory each program may use at any given time, allowing the
operating system to use the same memory locations for multiple tasks.
• If a program tries to access memory that isn't in its current range of accessible memory, but nonetheless
has been allocated to it, the kernel is interrupted in the same way as it would if the program were to
exceed its allocated memory. (See section on memory management.) Under UNIX this kind of interrupt
is referred to as a page fault.
• When the kernel detects a page fault it generally adjusts the virtual memory range of the program which
triggered it, granting it access to the memory requested. This gives the kernel discretionary power over
where a particular application's memory is stored, or even whether or not it has actually been allocated
yet.
• In modern operating systems, memory which is accessed less frequently can be temporarily stored on
disk or other media to make that space available for use by other programs. This is called swapping, as
an area of memory can be used by multiple programs, and what that memory area contains can be
swapped or exchanged on demand.
• "Virtual memory" provides the programmer or the user with the perception that there is a much larger
amount of RAM in the computer than is really there
• MULTI TASKINGMultitasking refers to the running of multiple independent computer programs on the same computer;
giving the appearance that it is performing the tasks at the same time. Since most computers can do at most one or two
things at one time, this is generally done via time-sharing, which means that each program uses a share of the computer's
time to execute.
• An operating system kernel contains a scheduling program which determines how much time each process spends
executing, and in which order execution control should be passed to programs. Control is passed to a process by the kernel,
which allows the program access to the CPU and memory. Later, control is returned to the kernel through some mechanism,
so that another program may be allowed to use the CPU. This so-called passing of control between the kernel and
applications is called a context switch.
• An early model which governed the allocation of time to programs was called cooperative multitasking. In this model,
when control is passed to a program by the kernel, it may execute for as long as it wants before explicitly returning control
to the kernel. This means that a malicious or malfunctioning program may not only prevent any other programs from using
the CPU, but it can hang the entire system if it enters an infinite loop.
• Modern operating systems extend the concepts of application preemption to device drivers and kernel code, so that the
operating system has preemptive control over internal run-times as well.
• The philosophy governing preemptive multitasking is that of ensuring that all programs are given regular time on the CPU.
This implies that all programs must be limited in how much time they are allowed to spend on the CPU without being
interrupted. To accomplish this, modern operating system kernels make use of a timed interrupt. A protected mode timer is
set by the kernel which triggers a return to supervisor mode after the specified time has elapsed. (See above sections on
Interrupts and Dual Mode Operation.)

You might also like