205 4th Class
205 4th Class
The operating system can be implemented with the help of various structures. The
structure of the OS depends mainly on how the various standard components of the
operating system are interconnected and melded into the kernel.
1. Simple/Monolithic Structure
2. Micro-Kernel Structure
3. Hybrid-Kernel Structure
4. Exo-Kernel Structure
5. Layered Structure
6. Modular Structure
7. Virtual Machines
Because operating systems have complex structures, we want a structure that is easy
to understand so that we can adapt an operating system to meet our specific needs.
Similar to how we break down larger problems into smaller, more manageable
subproblems, building an operating system in pieces is simpler. The operating
system is a component of every segment. The strategy for integrating different
operating system components within the kernel can be thought of as an operating
system structure. As will be discussed below, various types of structures are used to
implement operating systems.
Simple/Monolithic structure
Such operating systems do not have well-defined structures and are small, simple,
and limited. The interfaces and levels of functionality are not well separated. MS-
DOS is an example of such an operating system. In MS-DOS, application programs
are able to access the basic I/O routines. These types of operating systems cause the
entire system to crash if one of the user programs fails.
Micro-kernel Structure
Hybrid-Kernel Structure
Advantages of Exo-kernel
Disadvantages of Exo-kernel
A decline in consistency.
Layered structure
An OS can be broken into pieces and retain much more control over the system. In
this structure, the OS is broken into a number of layers (levels). The bottom layer
(layer 0) is the hardware, and the topmost layer (layer N) is the user interface. These
layers are so designed that each layer uses the functions of the lower-level layers.
This simplifies the debugging process, if lower-level layers are debugged and an
error occurs during debugging, then the error must be on that layer only, as the lower-
level layers have already been debugged.
The main disadvantage of this structure is that at each layer, the data needs to be
modified and passed on which adds overhead to the system. Moreover, careful
planning of the layers is necessary, as a layer can use only lower-level layers.
UNIX is an example of this structure.
It requires careful planning for designing the layers, as the higher layers use
the functionalities of only the lower layers.
Modular Structure
Based on our needs, a virtual machine abstracts the hardware of our personal
computer, including the CPU, disc drives, RAM, and NIC (Network Interface Card),
into a variety of different execution contexts, giving us the impression that each
execution environment is a different computer.
The fundamental issue with the virtual machine technique is disc systems. Let’s say
the physical machine only has three disc drives, but it needs to host an illustration of
it is a virtual box seven virtual machines. The program that creates virtual machines
would need a significant amount of disc space in order to provide virtual memory
and spooling, so it should be clear that it is impossible to assign a disc drive to every
virtual machine.
Interrupt systems are nothing but while the CPU can process the programs if the
CPU needs any IO operation. Then, it is sent to the queue and it does the CPU
process. Later on Input/output (I/O) operation is ready.
The I/O devices interrupt the data which is available and does the remaining
process; like that interrupts are useful. If interrupts are not present, the CPU needs
to be in idle state for some time, until the IO operation needs to complete. So, to
avoid the CPU waiting time interrupts are coming into picture.
Whenever an interrupt occurs, it causes the CPU to stop executing the current
program. Then, comes the control to interrupt handler or interrupt service routine.
Types of interrupts
Hardware interrupts
The interrupt signal generated from external devices and i/o devices are made
interrupt to CPU when the instructions are ready.
Hardware interrupts are classified into two types which are as follows −
Software interrupts
The interrupt signal generated from internal devices and software programs need to
access any system call then software interrupts are present.
What is an API?
Types of APIs
There are three basic forms of API –
1. WEB APIs
A Web API also called Web Services is an extensively used API over the web and
can be easily accessed using the HTTP protocols. A Web application programming
interface is an open-source interface and can be used by a large number of clients
through their phones, tablets, or PCs.
2. LOCAL APIs
In this type of API, the programmers get the local middleware services. TAPI
(Telephony Application Programming Interface), and .NET are common examples
of Local APIs.
3. PROGRAM APIs
It makes a remote program appear to be local by making use of RPCs (Remote
Procedural Calls). SOAP is a well-known example of this type of API.
Advantages of APIs
Efficiency: API produces efficient, quicker, and more reliable results than
the outputs produced by human beings in an organization.
Flexible delivery of services: API provides fast and flexible delivery of
services according to developers’ requirements.
Integration: The best feature of API is that it allows the movement of data
between various sites and thus enhances the integrated user experience.
Automation: As API makes use of robotic computers rather than humans, it
produces better and more automated results.
New functionality: While using API the developers find new tools and
functionality for API exchanges.
Disadvantages of APIs
Cost: Developing and implementing API is costly at times and requires high
maintenance and support from developers.
Security issues: Using API adds another layer of surface which is then prone
to attacks, and hence the security risk problem is common in APIs.