0% found this document useful (0 votes)
14 views23 pages

Os Presentation

what is operating system

Uploaded by

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

Os Presentation

what is operating system

Uploaded by

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

Badakhshan University

Computer Science Faculty


Information technology Department

Title: Operating-System Structure

Instructor teacher : Assist professor lecturer Nasrullah “Rahimi”.


Group partners: Hamidullah, Javid Ahmad, sardar. 1

Designed by: Abdul Hadi khan “Omari” (Shinwari).


Table of content:

• Operating System Design and Implementation


• Operating System Structure
• Operating System Debugging

2
Operating System Design
•Design and Implementation of OS not “solvable”, but some approaches
have proven successful
•Internal structure of different Operating Systems can vary widely
•Start the design by defining goals and specifications (of functionalities)
•Affected by choice of hardware, type of system
•User goals and System goals
•User goals – operating system should be convenient to use, easy to
learn, reliable, safe, and fast
•System goals – operating system should be easy to design, implement,
and maintain, as well as flexible, reliable, error-free, and efficient
3
Operating System Mechanisms and Policies

• Important principle to separate


Policy: What will be done?
Mechanism: How to do it?
• Mechanisms determine how to do something, policies
decide what will be done
• The separation of policy from mechanism is a very
important principle, it allows maximum flexibility if
policy decisions are to be changed later (example –
timer)
• Specifying and designing an OS is highly creative task 4
of software engineering
Implementation of Operating System

• Much variation
• Early OSes in assembly language
• (assembly language is set of hardware instructions which vary for different hardware arch)
• (for developing used NASM assembler)

• Then system programming languages like Algol, PL/1


• Now C, C++
• Actually usually a mix of languages
• Lowest levels in assembly
• Main body in C
• Systems programs in C, C++, scripting languages like PERL, Python, shell scripts
(scripting languages code like java script code)
5
• Using High-Level Programming Languages in OS
Implementation Continued…
• Using High-Level Programming Languages in OS
Implementation have some advantages and less
disadvantages.
• Advantages:
1. the code can be written faster, is more compact, and is easier to
understand and debug.
2. operating system is far easier to port—to move to some other
hardware.

• Disadvantages:
1.The only possible disadvantages of implementing an operating
system in a higher-level language are reduced speed and
increased storage requirements.
6
Continued…

• Well Known Operating System Implementation Language


• Windows: C++, kernel is in C
• Mac: Objective C, kernel is in C
• Linux: Most things are in C, many user land apps are in Python, KDE
is all C++

7
Operating System Structure:

• Structure mean the arrangement and relations between the parts or


elements of an Operating system.
• A modern operating system must be engineered carefully if it is to
function properly and be modified easily.
• A common approach is to partition the task into small components, or
modules. Each of these modules should be a well-defined portion of the
system, with carefully defined inputs, outputs, and functions.
• If the Operating system is very sample it will be ok to design it, as a
monolithic system (monolithic architecture which mean unified platform
fro all services)

8
Continued…

• General-purpose OS is very large program


• Various ways to structure ones
• Simple structure – MS-DOS
• More complex -- UNIX
• Layered – an abstraction
• Microkernel –Mach
• Modular Structure
• Hybrid Structure 9
Simple Structure -- MS-DOS

• MS-DOS – written to provide the most


functionality in the least space (small )
• Simple structure systems do not have well-
defined structures
• Everything between the system call
interface and physical hardware is the
kernel.
• Not divided into modules
• Although MS-DOS has some structure, its
interfaces and levels of functionality are
not well separated
• It was written for Intel 8088 10
Non Simple Structure -- UNIX

• UNIX – limited by hardware functionality, the original


UNIX operating system had limited structuring. The UNIX
OS consists of two separable parts
• The Unix only had limited structure: kernel and system programs

• Systems programs
• The kernel
• Consists of everything below the system-call
interface and above the physical hardware
• Provides the file system, CPU scheduling,
memory management, and other operating-
system functions; a large number of
functions are combined into one level.
11
Monolithic Structure

• Traditional UNIX System


Structure Beyond simple
but not fully layered

• This monolithic
structure was difficult
to implement and
maintain. It had a
distinct performance
advantage, however:
there is very little
overhead in the
system call interface or
in communication 12
Layered Approach

• The operating system is divided into a number of layers


(levels), each built on top of lower layers. The bottom layer
(layer 0), is the hardware; the highest (layer N) is the user
interface.
• Each layer is an implementation of an
abstract object that is the
encapsulation of data and operations
that can manipulate these data.
• The bottom layer (layer 0) is the
hardware.
• The main advantage of layered
approach is modularity.
• The lowest layer is process
management.
13
Microkernel System Structure:
• In the mid-1980s, researchers at Carnegie Mellon
University developed an operating system called
Mach that modularized the kernel using the
microkernel approach. This method structures the
operating system by removing all nonessential
components from the kernel and implementing them
as system and user-level programs. The result is a
smaller kernel.
•Moves as much from the kernel into user space
•Mach example of microkernel (modularized the
kernel)
•Mac OS X kernel (Darwin) partly based on Mach 14
Continued…
•Communication takes place between user modules
using message passing.
•Benefits:
•Easier to extend a microkernel and Operating system user
space.
• Easier to port the operating system to new architectures
• More reliable (less code is running in kernel mode)
• More secure
•Disadvantages:
• Performance overhead of user space to kernel space
communicationG
15
Microkernel System Structure graphical process:

16
Microkernel VS Layered:

17
Modules:

• Many modern operating systems implement loadable


kernel modules
• Uses object-oriented approach
• Each core component is separate
• Each talks to the others over known interfaces
• Each is loadable as needed within the kernel
• Overall, similar to layers but with more flexible
• Linux, Solaris, etc

18
Solaris Modular Approach cycle:

19
Hybrid Systems:
• Most modern operating systems are actually not one
pure model
• Hybrid combines multiple approaches to address
performance, security, usability needs
• Linux and Solaris kernels in kernel address space, so
monolithic, plus modular for dynamic loading of
functionality
• Windows mostly monolithic, plus microkernel for different
subsystem personalities
• Apple Mac OS X hybrid, layered, Aqua UI plus Cocoa
programming environment
• Below is kernel consisting of Mach microkernel and BSD
Unix parts, plus I/O kit and dynamically loadable modules
(called kernel extensions) 20
• Operating-System Debugging:
Debugging is finding and fixing errors, or bugs
• OS generate log files containing error information
• Failure of an application can generate core dump file capturing
memory of the process
• Operating system failure can generate crash dump file containing
kernel memory
• Beyond crashes, performance tuning can optimize system
performance
• Sometimes using trace listings of activities, recorded for analysis
• Profiling is periodic sampling of instruction pointer to look for statistical
trends
Kernighan’s Law: “Debugging is twice as hard as writing the code in
the first place. Therefore, if you write the code as cleverly as
possible, you are, by definition, not smart enough to debug it.”
21
• Improve Performance Tuning
performance by removing
bottlenecks
• OS must provide means of computing
and displaying measures of system
behavior
• For example, “top” program or
Windows Task Manager
• Linux: top, iotop
• Ubuntu: top, htop
• Windows: taskmanager
• Server Manager
• Log Manager

22
‫• له پام لرني څخه مونړی مننه!‬
‫ازتوجه تان یک جهان تشکر!‬
‫‪!Thanks from your golden Attention‬‬

‫‪‬نظــــــــــــــــــــــــــــــــــــــــــــــــــــــر‬
‫‪‬پیشنهـــــــــــــــــــــــــــــــــــــــــــــــاد‬

‫؟‬
‫‪‬انتقــــــــــــــــــــــــــــــــــــــــــــــــــــاد‬
‫‪‬ســــــــــــــــــــــــــــــــــــــــــــــــــــوال‬

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