Os Presentation
Os Presentation
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
• 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)
• 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…
7
Operating System Structure:
8
Continued…
• 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
• 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
16
Microkernel VS Layered:
17
Modules:
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
نظــــــــــــــــــــــــــــــــــــــــــــــــــــــر
پیشنهـــــــــــــــــــــــــــــــــــــــــــــــاد
؟
انتقــــــــــــــــــــــــــــــــــــــــــــــــــــاد
ســــــــــــــــــــــــــــــــــــــــــــــــــــوال