0% found this document useful (0 votes)
14 views

205 4th Class

Uploaded by

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

205 4th Class

Uploaded by

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

Operating Systems Structures

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.

A design known as an operating system enables user application programs to


communicate with the machine’s hardware Given its complex design and need to be
easy to use and modify, the operating system should be constructed with the utmost
care. A straightforward way to do this is to supernaturally develop the operating
system. These parts must each have unique inputs, outputs, and functionalities.

This note discusses a variety of operating system implementation structures,


including those listed below, as well as how and why they function. Depending on
this, we have the following structures in the operating system:

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

What is a System Structure for an Operating System?

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.

Advantages of Simple/Monolithic Structure

 It delivers better application performance because of the few interfaces


between the application program and the hardware.

 It is easy for kernel developers to develop such an operating system.

Disadvantages of Simple/Monolithic Structure

 The structure is very complicated, as no clear boundaries exist between


modules.

 It does not enforce data hiding in the operating system.

Micro-kernel Structure

This structure designs the operating system by removing all non-essential


components from the kernel and implementing them as system and user programs.
This results in a smaller kernel called the micro-kernel. Advantages of this structure
are that all new services need to be added to user space and does not require the
kernel to be modified. Thus it is more secure and reliable as if a service fails, then
rest of the operating system remains untouched. Mac OS is an example of this type
of OS.
Advantages of Micro-kernel Structure

 It makes the operating system portable to various platforms.

 As microkernels are small so these can be tested effectively.

Disadvantages of Micro-kernel Structure

 Increased level of inter module communication degrades system


performance.

Hybrid-Kernel Structure

Hybrid-kernel structure is nothing but just a combination of both monolithic-kernel


structure and micro-kernel structure. Basically, it combines properties of both
monolithic and micro-kernel and make a more advance and helpful approach. It
implements speed and design of monolithic and modularity and stability of micro-
kernel structure.

Advantages of Hybrid-Kernel Structure

 It offers good performance as it implements the advantages of both structure


in it.

 It supports a wide range of hardware and applications.

 It provides better isolation and security by implementing micro-kernel


approach.

 It enhances overall system reliability by separating critical functions into


micro-kernel for debugging and maintenance.

Disadvantages of Hybrid-Kernel Structure

 It increases overall complexity of system by implementing both structure


(monolithic and micro) and making the system difficult to understand.

 The layer of communication between micro-kernel and other component


increases time complexity and decreases performance compared to
monolithic kernel.
Exo-Kernel Structure

Exokernel is an operating system developed at MIT to provide application-level


management of hardware resources. By separating resource management from
protection, the exokernel architecture aims to enable application-specific
customization. Due to its limited operability, exokernel size typically tends to be
minimal.

Advantages of Exo-kernel

 Support for improved application control.

 Separates management from security.

 It improves the performance of the application.

 A more efficient use of hardware resources is made possible by accurate


resource allocation and revocation.

 It is simpler to test and create new operating systems.

 Each user-space program is allowed to use a custom memory management


system.

Disadvantages of Exo-kernel

 A decline in consistency.

 Exokernel interfaces have a complex architecture.

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.

Advantages of Layered Structure

 Layering makes it easier to enhance the operating system, as the


implementation of a layer can be changed easily without affecting the other
layers.

 It is very easy to perform debugging and system verification.

Disadvantages of Layered structure

 In this structure, the application’s performance is degraded as compared to


simple structure.

 It requires careful planning for designing the layers, as the higher layers use
the functionalities of only the lower layers.

Modular Structure

It is considered as the best approach for an OS. It involves designing of a modular


kernel. The kernel has only a set of core components and other services are added as
dynamically loadable modules to the kernel either during runtime or boot time. It
resembles layered structure due to the fact that each kernel has defined and protected
interfaces, but it is more flexible than a layered structure as a module can call any
other module.
VMs (virtual machines)

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.

What are interrupts?

An interrupt is a signal from a device attached to a computer or from a program


within the computer that requires the operating system to stop and figure out what
to do next.

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.

Processor handle interrupts

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

There are two types of interrupts which are as follows −

Hardware interrupts

The interrupt signal generated from external devices and i/o devices are made
interrupt to CPU when the instructions are ready.

For example − In a keyboard if we press a key to do some action this pressing of


the keyboard generates a signal that is given to the processor to do action, such
interrupts are called hardware interrupts.

Hardware interrupts are classified into two types which are as follows −

 Maskable Interrupt − The hardware interrupts that can be delayed when a


highest priority interrupt has occurred to the processor.
 Non Maskable Interrupt − The hardware that cannot be delayed and
immediately be serviced by the processor.

Software interrupts

The interrupt signal generated from internal devices and software programs need to
access any system call then software interrupts are present.

Software interrupt is divided into two types. They are as follows −

 Normal Interrupts − The interrupts that are caused by the software


instructions are called software instructions.
 Exception − Exception is nothing but an unplanned interruption while
executing a program. For example − while executing a program if we got a
value that is divided by zero is called an exception.

What is an API?

API full form is an Application Programming Interface that is a collection of


communication protocols and subroutines used by various programs to
communicate between them. A programmer can make use of various API tools to
make their program easier and simpler. Also, an API facilitates programmers with
an efficient way to develop their software programs. Thus api meaning is when an
API helps two programs or applications to communicate with each other by
providing them with the necessary tools and functions. It takes the request from the
user and sends it to the service provider and then again sends the result generated
from the service provider to the desired user.

A developer extensively uses APIs in his software to implement various features


by using an API call without writing complex codes for the same. We can create an
API for an operating system, database system, hardware system, JavaScript file, or
similar object-oriented files. Also, an API is similar to a GUI(Graphical User
Interface) with one major difference. Unlike GUIs, an application program
interface helps software developers to access web tools while a GUI helps to make
a program easier to understand for users.

How do APIs Work?


The working of an API can be clearly explained with a few simple steps. Think of
a client-server architecture where the client sends the request via a medium to the
server and receives the response through the same medium. An API acts as a
communication medium between two programs or systems for functioning. The
client is the user/customer (who sends the request), the medium is the application
interface programming, and the server is the backend (where the request is
accepted and a response is provided).

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.

How to Create APIs?


Creating an API is an easy task unless you are very well clear on the basic
concepts. It’s an iterative process (based on feedback) that just includes a few easy
steps:

 Plan your goal and the intended users


 Design the API architecture
 Develop (Implement the code) and Test API
 Monitor its working and work on feedback

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.

You might also like