Aplication of Software
Aplication of Software
Operating System
An operating system (OS) is system software that manages computer hardware and software
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, peripherals, 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,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.
An operating system is"the layer of software that manages a computer's resources for its users and their
applications".
Operating systems include the software that is always running, called a kernel—but can include other
software as well.
Operating systems allocate resources between different applications, deciding when they will
On modern personal computers,users often want to run several applications at once. In order to ensure
that one program cannot monopolize the computer's limited hardware resources, the operating system
gives each application a share of the resource, either in time (CPU) or space (memory). The operating
system also must isolate applications from each other to protect them from errors and security
vulnerabilities in another application's code, but enable communications between different applications.
Operating systems provide an interface that abstracts the details of accessing hardware details
(such as physical memory) to make things easier for programmers. Virtualization also
enables the operating system to mask limited hardware resources; for example, virtual memory
can provide a program with the illusion of nearly unlimited memory that exceeds the computer's
actual memory.
Operating systems provide common services, such as an interface for accessing network and
disk devices. This enables an application to be run on different hardware without needing to be
rewritten.
Which services to include in an operating system varies greatly, and this functionality
Multicomputer operating systems often support remote procedure calls where a CPU can call a
procedure on another CPU or distributed shared memory, in which the operating system uses
virtualization to generate shared memory that does not physically exist.
Distributed systems
A distributed system is a group of distinct, networked computers—each of which might have their own
operating system and file system. Unlike multicomputers, they may be dispersed anywhere in the world.
Middleware, an additional software layer between the operating system and applications, is often used
to improve consistency. Although it functions similarly to an operating system, it is not a true operating
system.
Embedded
Embedded operating systems are designed to be used in embedded computer systems, whether they
are internet of things objects or not connected to a network. Embedded systems include many
household appliances. The distinguishing factor is that they do not load user-installed software.
Consequently, they do not need protection between different applications, enabling simpler designs.
and the smallest are for smartcards. Examples include Embedded Linux, QNX, VxWorks, and the extra-
small systems RIOT andTiny OS.
Real-time
A real-time operating system is an operating system that guarantees to process events or data by or at a
specific moment in time. Hard real-time systems require exact timing and are common in
manufacturing, avionics, military, and other similar uses.With soft real-time systems, the occasional
missed event is acceptable; this category often includes audio or multimedia systems,as well as
smartphones.
Hypervisor
A hypervisor is an operating system that runs a virtual machine. The virtual machine is unaware that it is
an application and operates as if it had its own hardware.
3
Library
A library operating system (libOS) is one in which the services that a typical operating system provides,
such as networking, are provided in the form of libraries and composed with a single application and
configuration code to construct a unikernel: a specialized (only the absolute necessary pieces of code
are extracted from libraries and bound together single address space,machine image that can be
deployed to cloud or embedded environments.
The components of an operating system are designed to ensure that various parts of a computer
function cohesively. With the de facto obsoletion of DOS, all user software must interact with the
operating system to access hardware3
Kernel
A kernel connects the application software to the hardware of a computer.
The kernel is the part of the operating system that provides protection between different
applications and users. This protection is key to improving reliability by keeping errors isolated to one
program, as well as security by limiting the power of malicious software and protecting private data, and
ensuring that one program cannot monopolize the computer's resources.[48]
Most operating systems have two modes of operation in user mode, the hardware checks that the
software is only executing legal instructions, whereas the kernel has unrestricted powers and is not
subject to these checks.The kernel also manages memory for other processes and controls access to
input/output devices.
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 typically
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. However, in some systems an application can request that the
operating system execute another application within the same process, either as a subroutine or in a
separate thread, e.g., the LINK and ATTACH facilities of OS/360 and successors.
Interrupts
An interrupt (also known as an abort, exception, fault, signal, or trap) provides an efficient way for most
operating systems to react to the environment. Interrupts cause the central processing unit3(CPU) to
have a control flow change away from the currently running program to an interrupt handler, also
known as an interrupt service routine (ISR). An interrupt service routine may cause the central
processing unit (CPU) to have a context switch. The details of how a computer processes an interrupt
vary from architecture to architecture, and the details of how interrupt service routines behave vary
from operating system to operating system. However,several interrupt functions are common. The
architecture and operating system must:
Software interrupt
A software interrupt is a message to a process that an event has occurred.[52] This contrasts with a
hardware interrupt — which is a message to the central processing unit (CPU) that an event has
occurred. Software interrupts are similar to hardware interrupts — there is a change away from the
currently running process.[59]
Similarly, both hardware and software interrupts execute an interrupt service routine.
Hardware interrupt
Input/output (I/O) devices are slower than the CPU. Therefore, it would slow down the computer if the
CPU had to wait for each I/O to finish. Instead, a computer may implement interrupts for I/O
completion, avoiding the need for polling or busy waiting.
While the writing takes place, the operating system will context switch to other processes as normal.
When the device finishes writing, the device will interrupt the currently running process by asserting an
interrupt request. The device will also place an integer onto the data bus.
A) Push the contents of the program counter (a register) followed by the status register onto the
callvstack.
B)Push the contents of the other registers onto the call stack.
C)Read the integer from the data bus and the integer is an offset to the interrupt vector table. The
vector table's instructions will access the device-status table and extract the process control block.
Memory management
Among other things, a multiprogramming operating system kernel must be responsible for managing all
system memory which is currently in use by the 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 does not 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 causes the CPU to re-enter supervisor mode, placing the kernel in charge.5
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.
Virtual memory
Many operating systems can "trick" programs into using memory scattered around the hard disk and
RAM as if it is one continuous chunk of memory, called virtual memory.
The 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 is not accessible memory, but nonetheless has been allocated
to it, the kernel is interrupted . This kind of interrupt is typically 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.
In modern operating systems, memory which is accessed less frequently can be temporarily stored on a
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.
Concurrency
Concurrency refers to the operating system's ability to carry out multiple tasks simultaneously. Virtually
all modern operating systems support concurrency. Threads enable splitting a process' work into
multiple parts that can run simultaneously. The number of threads is not limited by the number of
processors available. If there are more threads than processors, the operating system kernel schedules,
suspends, and resumes threads, controlling when each thread runs and how much CPU time it receives.
Some operating system designs are more secure than others. Those with no isolation between the
kernel and applications are least secure, while those with a monolithic kernel like most generalpurpose
operating systems are still vulnerable if any part of the kernel is compromised. A more secure design
features microkernels that separate the kernel's privileges into many separate security domains and
reduce the consequences of a single kernel breach.[115] Unikernels are another approach that improves
security by minimizing the kernel and separating out other operating systems functionality by
application.[115]
Most operating systems are written in C or C++, which create potential vulnerabilities for exploitation.
Despite attempts to protect against them, vulnerabilities are caused by buffer overflow6 attacks, which
are enabled by the lack of bounds checking.
Operating systems security is hampered by their increasing complexity and the resulting inevitability of
bugs.Because formal verification of operating systems may not be feasible, developers use operating
system hardening to reduce vulnerabilities, e.g. address space layout randomization,control-flow
integrity, access restrictions, and other techniques.[123] There are no restrictions on who can contribute
code to open source operating systems; such operating systems have transparent change histories and
distributed governance structures.[124]
A hobby operating system may be classified as one whose code has not been directly derived from an
existing operating system, and has few users and active developers.6
In some cases, hobby development is in support of a "homebrew" computing device, for example, a
simple single-board computer powered by a 6502 microprocessor. Or, development may be for an
architecture already in widespread use. Operating system development may come from entirely new
concepts, or may commence by modeling an existing operating system.