CSC205 Session 04
CSC205 Session 04
STRUCTURING METHODS
An operating system is a construct that allows the user application programs to interact with the
system hardware. Since the operating system is such a complex structure, it should be created with
utmost care so it can be used and modified easily. Modern operating systems are large and complex
that Consists of different components interconnected and melded into a kernel. For designing a
system, the following three different types of system structures are used.
1. Simple structure
2. Layered structure
3. Microkernel
Simple Structure: There are many operating systems that have a rather simple structure. These
started as small systems and rapidly expanded much further than their scope. A common example
of this is MS-DOS. It was designed simply for a niche amount for people. There was no indication
that it would become so popular.
It is better that operating systems have a modular structure, unlike MS-DOS. That would lead to
greater control over the computer system and its various applications. The modular structure would
Page 1 of 5
also allow the programmers to hide information as required and implement internal routines as
they see fit without changing the outer specifications.
Layered Structure: One way to achieve modularity in the operating system is the layered
approach. In this, the bottom layer is the hardware and the topmost layer is the user interface. An
image demonstrating the layered approach is as follows −
As seen from the image, each upper layer is built on the bottom layer. All the layers hide some
structures, operations etc from their upper layers.
One problem with the layered structure is that each layer needs to be carefully defined. This is
necessary because the upper layers can only use the functionalities of the layers below them.
✓ The main disadvantage is that the OS tends to be less efficient than other implementations.
Microkernel: Is a small operating system core that provides the foundation for modular
extensions. The main function is to provide a communication facility between the client program
and the various services that are also running on the user space. Microkernel architecture assigns
only a few essential functions to the kernel, including the address space, IPC and basic scheduling.
The benefits of the microkernel are as follows:
✓ Extending the operating system becomes much easier.
Page 2 of 5
✓ Any changes to the kernel tend to be fewer, since the kernel is smaller.
ABSTRACTIONS IN OS
In the context of computing, an abstraction is a representation that hides specifics from a consumer
of services (a consumer being a computer program or human), making a system more generic and
thus easily understood. A good example is your laptop’s operating system (OS). An Abstraction
can also be referred as model. The process of transforming one abstraction into a more detailed
abstraction is called refinement. The new abstraction can be referred to as a refinement of the
original one. Abstractions and their refinements typically do not coexist in the same system
description. Precisely what is meant by a more detailed abstraction is not well defined. There needs
to be support for substitutability of concepts from one abstraction to another. Composition occurs
when two abstractions are used to define another higher abstraction. Decomposition occurs when
an abstraction is split into smaller abstractions.
Information management is one of the goals of abstraction. Complex features of one abstraction
are simplified into another abstraction. Good abstractions can be very useful while bad abstractions
can be very harmful. A good abstraction leads to reusable components.
Information hiding distinguishes between public and private information. Only the essential
information is made public while internal details are kept private. This simplifies interactions and
localizes details and their operations into well-defined units. Abstraction can be accomplished on
functions, data, and processes. In functional abstraction, details of the algorithms to accomplish
Page 3 of 5
the function are not visible to the consumer of the function. The consumer of the function needs
to only know the correct calling convention and have trust in the accuracy of the functional results.
In data abstraction, details of the data container and the data elements may not be visible to the
consumer of the data. The data container could represent a stack, a queue, a list, a tree, a graph, or
many other similar data containers. The consumer of the data container is only concerned about
correct behavior of the data container and not many of the internal details. Also, exact details of
the data elements in the data container may not be visible to the consumer of the data element. An
encrypted certificate is the ultimate example of an abstract data element. The certificate contains
data that is encrypted with a key not know to the consumer. The consumer can use this certificate
to be granted capabilities but cannot view nor modify the contents of the certificate.
Traditionally, data abstraction and functional abstraction combine into the concept of abstract data
types (ADT). Combining an ADT with inheritance gives the essences of an object-based paradigm.
In process abstraction, details of the threads of execution are not visible to the consumer of the
process. An example of process abstraction is the concurrency scheduler in a database system. A
database system can handle many concurrent queries. These queries are executed in a particular
order, some in parallel while some sequential, such that the resulting database cannot be
distinguished from a database where all the queries are done in a sequential fashion. A consumer
of a query which represents one thread of execution is only concerned about the validity of the
query and not the process used by the database scheduler to accomplish the query.
Consequently, Process Abstractions are the most fundamental operating system abstraction.
Processes organize information about other abstractions and represent a single thing that the
computer is “doing.” You know processes as applications.
The fundamental operation of the operating system (OS) is to abstract the hardware to the
programmer and user. The operating system provides generic interfaces to services provided by
the underlying hardware.
The kernel is responsible for maintaining the important abstractions of the operating system. –
Kernel code executes in kernel mode with full access to all the physical resources of the computer.
–All kernel code and data structures are kept in the same single address space.
The most advantage of abstraction: An operating system abstraction layer (OSAL) provides an
application programming interface (API) to an abstract operating system making it easier and
quicker to develop code for multiple software or hardware platforms.
Page 4 of 5
Page 5 of 5