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

System Structures

The document outlines the structures and services of operating systems, detailing user interfaces, system calls, and design principles. It discusses various operating system structures such as monolithic, micro-kernel, modular, and layered approaches, highlighting their advantages and disadvantages. Additionally, it covers system programs and the roles they play in providing functionality beyond the kernel.

Uploaded by

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

System Structures

The document outlines the structures and services of operating systems, detailing user interfaces, system calls, and design principles. It discusses various operating system structures such as monolithic, micro-kernel, modular, and layered approaches, highlighting their advantages and disadvantages. Additionally, it covers system programs and the roles they play in providing functionality beyond the kernel.

Uploaded by

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

Contents

2 Operating system structures............................................................. 3


2.1 Operating system services........................................................ 3
2.2 User Operating System Interfaces............................................ 5
2.2.1 Command Line Interface (CLI):......................................... 5
2.2.2 Graphical User Interface (GUI):.......................................... 6
2.3 System Calls............................................................................. 7
2.3.1 Types of System Calls........................................................ 7
2.4 System Programs...................................................................... 8
2.5Operating System Design and Implementation........................ 9
2.5.1 Design Goals:...................................................................... 9
2.5.2 Mechanisms and Policies:................................................. 10
2.5.3 Implementation:................................................................. 10
2.6 Operating System Structures................................................... 10
2.6.1 Simple/Monolithic structure.............................................. 11
2.6.2 Micro-kernel Structure...................................................... 11
2.6.3 Modular System Structures............................................... 14
2.6.4 Layered Approach............................................................. 15
2.6.5 Exo-Kernel Structure:........................................................ 16
2.6.6 Hybrid-Kernel Structure:................................................... 16
2.6.7 Virtual Machines:.............................................................. 17
2.7 System Generation................................................................... 18
2.8 System Boot............................................................................ 19
2.8.1 The BOOT process:........................................................... 19

eTc
ACRONYMS USED
OS – OPERATING SYSTEM(S)
HW – HARDWARE
SYSGEN – SYSTEM GENERATION

eTc
2 Operating system structures

2.1 Operating system services

Operating systems provide environments in which user programs and services


are run. Some of these services include, User interfaces, Program execution,
I/O Operations, File system manipulation, communications and Error detection,
resource allocation, Accounting(logging) and All the while providing protection
and security to system and user resources from harm.
User interfaces: A mean by which users can issue commands to the computer
systems examples Include Command-line{sh, csh, tcsh, zsh, bash} or Graphical
User Interfaces {Windows, KDE, Gnome, etc}

eTc
Program Execution: The OS must be able to load a program into RAM, run the
program and terminate the program, either normally or abnormally.
I/O Operation: Each program requires an input and produces output. This
involves the use of I/O. So the operating systems are providing I/O makes it
convenient for the users to run programs.
File System Manipulation: In addition to raw data storage, the OS is
responsible for maintaining directory and sub directory structures, mapping
filenames and providing tools to navigate and utilize the file system.
Communications: Inter-Process Communication, IPC, between all applications
running in a machine at the moment.
Error Detection: Both hardware and software errors must be detected and
handled appropriately. It is for this reason that some systems have Complex
error avoidance or recovery systems.
Resource allocation: When multiple users are logged on the system or multiple
jobs are running at the same time, resources must be allocated to each of them.
Many different types of resources are managed by the operating system.
Accounting: The operating systems keep track of which users use how many and
which kinds of computer resources. This record keeping may be used for
accounting (so that users can be billed) or simply for accumulating usage statistic
Protection and Security: When several disjointed processes execute
concurrently, it should not be possible for one process to interfere with the others,
or with the operating system itself. Protection involves ensuring that all access to
system resources is controlled. Security of the system from outsiders is also
important. Such security starts with each user having to authenticate him to the
system, usually by means of a password, to be allowed access to the resources.

eTc
2.2 User Operating System Interfaces

As technology evolves many operating system user interfaces have been


forged however all of them depend highly on the Basic two types of User
Operating system interfaces available on the market as we speak, that is,
Command Line Interface (CLI) and the Graphical User Interface(GUI), therefore
our discussion shall focus more on the two.

2.2.1 Command Line Interface (CLI):


The Command line Interface depends on a Command Interpreter which GETS and
PROCESSES the next user request and Launches the requested program. In some
operating systems the CI may be incorporated directly into the kernel, however more
commonly the CI is a separate program that launches once a user logs in or otherwise
accesses the system. Unix, for example, provides users with a variety of shell interfaces,
which can either be launched automatically at login or can be changed on the fly.

eTc
2.2.2 Graphical User Interface (GUI):
The Windows, Interfaces, Menus, and Pointing device (WIMP) GUI
Commonly referred to as “Desktop” in the PC world, and “Home” in the mobile
device world comes with file folders, trash cans, application and resource icons.
*An Icon is a representation of a some item on the system and different icons
respond differently when activated/interfaced.*
The very first GUI was developed in the early 1970’s at Xerox PARC which was
later followed by the Quantel Paintbox by an imaging company Quantel, GEM,
Apple Lisa, and Windows 1.0 which was released in 1985.
In some systems GUI is just a front end for activating the traditional CLI for example
Ubuntu, and many Debian based OSes while in others the GUI is a true graphical shell
on its own, for example in Microsoft Windows, Android OS among others

2.2.3 Choosing an Operating System


The decision on which Operating system Interface to choose shall depend on very
many variables, such as the nature of work the system is to accomplish, location,
policies in place among others. It should, however be noted that modern systems
allow individual users to select their desired interface, customize its operation as
well as the ability to switch between different interfaces as needed.

eTc
2.3 System Calls
System calls provide an interface between the User or application Programs and
the Operating system, system calls are generally written in C or C++, although
some are written in assembly for optimal performance.
System calls allow user-level processes to request some services from the
operating system which process itself is not allowed to do. For example, for I/O
a process involves a system call telling the operating system to read or write
particular area and this request is satisfied by the operating system.

2.3.1 Types of System Calls


Process Control:
• end, abort • wait for time
• load, execute • wait event, signal event
• create process, terminate process • allocate and free memory
• get process attributes, set
process attributes
File management:
• create file, delete filenames • Read, Write, Reposition
• Open, Close • get file attributes, set file attributes
Device Management:
• request device, release device • get device attributes, set device
attributes
• read, write, reposition
• logically attach or detach devices
Information Maintenance:
• get time or date, set time or date • get process, file, or device attributes
• get system data, set system data • set process, file, or device attributes

eTc
Communications:
• create, delete communication • transfer status information
connections
• attach or detach remote device
• send, receive messages

Protection ad Security:
• get security attributes • initialize security descriptors
• set security attributes
Protection provides mechanisms for controlling which users / processes have
access to which system resources. System calls allow the access mechanisms
to be adjusted as needed, and for non-privileged users to be granted elevated
access permissions under carefully controlled temporary circumstances. Once
only of concern on multi-user systems, protection is now important on all
systems, in the age of ubiquitous network connectivity.

2.4 System Programs


A system program is that program that is programmed with in an operating
system. System programs provide OS functionality through separate
applications, which are not part of the kernel or command interpreter. These
programs are known as system utilities or System applications
Most Operating systems come with useful applications such as calculators and
simple editors (notepad) and it is for this reason why the debate on the border
between system and non system applications.
System Programs may be divided into the following categories:
➔ File Management: This includes programs that create, delete, copy,
rename, print, list and generally manipulate files and directories
➔ Status Information: Utilities to check on the date, time, number of users,
processes running, data logging. System registries are used to store and
recall configuration information for a particular application.

eTc
➔ File Modification: Text editors and other tools which can change file content
➔ Programming language support: Compilers, linkers, debuggers,
profilers, assemblers, library archive management, interpreters for
common languages and support for make
➔ Program loading and Execution: Loaders , dynamic loaders, overlay
loaders, etc as well as interactive debuggers.
➔ Communications: Programs for providing connectivity between
processes and users, including mail, web browsers, remote logins, file
transfers and remote command execution.
➔ Background Services: System daemons that are commonly started
when a system is booted, and run as long as the system is running,
handling necessary services. For example network daemons, print
servers, process schedulers, and system error monitoring services.

Most operating systems today also come complete with a set of application
programs to provide additional services, such as copying files or checking the time
and date. Most users' views of the system is determined by their command
interpreter and the application programs. Most never make system calls, even
through the API, ( with the exception of simple ( file ) I/O in user-written programs.)

eTc
2.5 Operating System Design and
Implementation.

Operating systems are design and Implementation entails the step taken while
designing an operating System. In collaboration with all the good habits in
regards to system Design and implementation, Designing Operating systems
Focus with more on the Following Aspects;

2.5.1 Design Goals:


• Requirements:
Properly defined features which the finished system must have. They are the
very first step in designing any large complex system
➢ User requirements: These are the features that the user cares about
and understands. They generally do not include any implementation details, and
are written similar to the product description one might find on a sales brochure
or the outside of a shrink-wrapped box.
➢ System Requirements: These are written for the developers and
include more details about implementation specifics, performance requirements,
compatibility constraints, etc. these requirements serve as a contract between the
customer and the developer.
Requirements for operating systems can vary greatly depending on the planned scope
and usage of the system. ( Single user / multi-user, specialized system / general
purpose, high/low security, performance needs, operating environment, etc.)

eTc
2.5.2 Mechanisms and Policies
Policies determine what is to be done. Mechanisms determine how it is to be
implemented. If properly separated and implemented, policy changes can be
easily adjusted without re-writing the code, just by adjusting parameters or
possibly loading new data / configuration files. For example the relative priority
of background versus foreground tasks.

2.5.3 Implementation
Traditionally OSes were written in assembly language. This provided direct control
over hardware-related issues, but inextricably tied a particular OS to a particular HW
platform. Recent advances in compiler efficiencies mean that most modern OSes are
written in C, or more recently, C++. Critical sections of code are still written in
assembly language, ( or written in C, compiled to assembly, and then fine-tuned and
optimized by hand from there). Operating systems may be developed using emulators
of the target hardware, particularly if the real hardware is unavailable for instance if the
HW is not built yet , or not a suitable platform for development, such as smartphones,
game consoles, or other similar devices. That may brick after multiple test runs.

eTc
2.6 Operating System 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.
Examples of Structures used to implement Operating systems include:
• Simple/Monolithic Structure
• Micro-Kernel Structure
• Hybrid-Kernel Structure
• Exo-Kernel Structure
• Layered Structure
• Modular Structure
• Virtual Machines

2.6.1 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. It does
not break the system into subsystems, and has no distinction between user and
kernel modes, allowing all programs direct access to the underlying hardware. 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.

eTc
ILLUSTRATION OF MS-DOS layer Structure

Advantages Of Monolithic/Simple 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:
The structure is very complicated, as no clear boundaries exist between modules.
It does not enforce data hiding in the operating system.

2.6.2 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.
Most micro-kernels provide basic process and memory management, and message passing
between other services, and not much more. System expansion can also be easier, because
it only involves adding more system applications, not rebuilding a new kernel. Mach was

eTc
the first and most widely known micro-kernel, and now forms a major
component of Mac OS.
Illustration of a typical Micro-kernel

Advantages of Micro-kernel structure


It makes the operating system portable to various platforms.
As micro-kernels are small so these can be tested effectively.
Disadvantages of Micro-kernel structure
Increased level of inter module communication degrades system performance.

2.6.3 Modular System Structures


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

eTc
more flexible than a layered structure as a module can call any other module.
For example Solaris OS is organized as shown in the figure.

eTc
2.6.4 Layered Approach
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. This approach allows each layer to be developed and debugged
independently, with the assumption that all lower layers have already been debugged and
are trusted to deliver proper services. The problem is deciding what order in which to
place the layers, as no layer can call upon the services of any higher layer, and so many
chicken-and-egg situations may arise.

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.

eTc
2.6.5 Exo-Kernel Structure
Exo-Kernel 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 interoperability, exokernel size typically tends to be minimal.

The OS will always have an impact on the functionality, performance, and scope of
the apps that are developed on it because it sits in between the software and the
hardware. The exokernel operating system makes an attempt to address this
problem by rejecting the notion that an operating system must provide abstractions
upon which to base applications. The objective is to limit developers use of
abstractions as little as possible while still giving them freedom.
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.

2.6.6 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 implement speed
and design of monolithic and modularity and stability of micro-kernel structure.

eTc
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

2.6.7 Virtual Machine


A virtual machine takes the layered approach to its logical conclusion. It treats
hardware and the operating system kernel as though they were all hardware. A
virtual machine provides an interface identical to the underlying bare hardware.
The operating system creates the illusion of multiple processes, each executing
on its own processor with its own (virtual) memory.
The resources of the physical computer are shared to create the virtual machines.
CPU scheduling can create the appearance that users have their own processor.
Spooling and a file system can provide virtual card readers and virtual line printers. A
normal user time-sharing terminal serves as the virtual machine operator’s console.

eTc
Illustration of a non virtual machines besides a virtual machine implementation

Advantages/Disadvantages of Virtual Machines


The virtual-machine concept provides complete protection of system resources
since each virtual machine is isolated from all other virtual machines. This
isolation, however, permits no direct sharing of resources.
A virtual-machine system is a perfect vehicle for operating-systems research
and development. System development is done on the virtual machine, instead
of on a physical machine and so does not disrupt normal system operation.
The virtual machine concept is difficult to implement due to the effort required to
provide an exact duplicate to the underlying machine.

eTc
2.7 System Generation
Operating systems are designed to run on any of a class of machines at a variety of
sites with a variety of peripheral configurations. The system must then be configured
or generated for each specific computer site, a process sometimes known as system
generation (SYSGEN). SYSGEN program obtains information concerning the specific
configuration of the hardware system. To generate a system, we use a special
program. The SYSGEN program reads from a given file, or asks the operator of the
system for information concerning the specific configuration of the hardware system,
or probes the hardware directly to determine what components are there.

The following kinds of information must be determined, What CPU will be used?
What options (extended instruction sets, floating point arithmetic, and so on) are
installed? For multiple-CPU systems, each CPU must be described. How much
memory is available? Some systems will determine this value themselves by
referencing memory location after memory location until an "illegal address" fault
is generated. This procedure defines the final legal address and hence the
amount of available memory. What devices are available? The system will need
to know how to address each device (the device number), the device interrupt
number, the device's type and model, and any special device characteristics.
At one extreme the OS source code can be edited, re-compiled, and linked into a
new kernel. More commonly configuration tables determine which modules to link
into the new kernel, and what values to set for some key important parameters.
This approach may require the configuration of complicated makefiles, which can
be done either automatically or through interactive configuration programs; Then
make is used to actually generate the new kernel specified by the new parameters.
At the other extreme a system configuration may be entirely defined by table
data, in which case the "rebuilding" of the system merely requires editing data
tables. Once a system has been regenerated, it is usually required to reboot the
system to activate the new kernel. Because there are possibilities for errors,
most systems provide some mechanism for booting to older or alternate kernels.

eTc
2.8 System Boot
The procedure of starting a computer by loading the kernel is known as booting the
system. Most computer systems have a small piece of code, stored in ROM, known
as the bootstrap program or bootstrap loader. This code is able to locate the
kernel, load it into main memory, and start its execution. Some computer systems,
such as PCs, use a two-step process in which a simple bootstrap loader fetches a
more complex boot program from disk, which in turn loads the kernel.

2.8.1 The BOOT process:


1. When the system powers up, an interrupt is generated which loads a
memory address into the program counter, and the system begins executing
instructions found at that address. This address points to the "bootstrap"
program located in ROM chips ( or EPROM chips) on the motherboard.

2. The ROM bootstrap program first runs hardware checks, determining what physical
resources are present and doing power-on self tests (POST) of all HW for which
this is applicable. Some devices, such as controller cards may have their own on-
board diagnostics, which are called by the ROM bootstrap program.

3. The user generally has the option of pressing a special key during the
POST process, which will launch the ROM BIOS configuration utility if
pressed. This utility allows the user to specify and configure certain
hardware parameters as where to look for an OS and whether or not to
restrict access to the utility with a password.
• Some hardware may also provide access to additional configuration
setup programs, such as for a RAID disk controller or some special
graphics or networking cards.

4. Assuming the utility has not been invoked, the bootstrap program then looks for a
non-volatile storage device containing an OS. Depending on configuration, it may

eTc
look for a floppy drive, CD ROM drive, or primary or secondary hard
drives, in the order specified by the HW configuration utility.

5. Assuming it goes to a hard drive, it will find the first sector on the hard drive and
load up the fdisk table, which contains information about how the physical hard
drive is divided up into logical partitions, where each partition starts and ends,
and which partition is the "active" partition used for booting the system.

There is also a very small amount of system code in the portion of the first disk
block not occupied by the fdisk table. This bootstrap code is the first step that is
not built into the hardware, i.e. the first part which might be in any way OS-
specific. Generally this code knows just enough to access the hard drive, and to
load and execute a ( slightly ) larger boot program.

✗ For a single-boot system, the boot program loaded off of the hard disk will
then proceed to locate the kernel on the hard drive, load the kernel into
memory, and then transfer control over to the kernel. There may be some
opportunity to specify a particular kernel to be loaded at this stage, which
may be useful if a new kernel has just been generated and doesn't work, or if
the system has multiple kernels available with different configurations for
different purposes. ( Some systems may boot different configurations
automatically, depending on what hardware has been found in earlier steps.)

✗ For dual-boot or multiple-boot systems, the boot program will give the
user an opportunity to specify a particular OS to load, with a default choice
if the user does not pick a particular OS within a given time frame. The
boot program then finds the boot loader for the chosen single-boot OS,
and runs that program as described in the previous point.

eTc
Refercences
Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin, "Operating

System Concepts, Ninth Edition ", Chapter 2


https://geeksforgeeks.com
https://getmyuni.com
https://wikepedia.com
https://xeroxPARC.com

eTc

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy