Operating System Lecture 2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Operating Systems

Lecture 3
Agenda for Today
 Operating system structures
 Operating system design and
implementation
 UNIX/Linux directory structure
 Browsing UNIX/Linux directory structure

May 15, 2024


Operating System Structures

 Simple Structure
 Layered Approach
 Microkernels
 Virtual Machines
Layered Approach

May 15, 2024


Each upper layer communicate with closest
lower layer
Layered Approach …
 Modularity
 Each layer uses functions and services of
only lower layers
 Simplifies debugging and system
verification.
 The major difficulty with layered approach
is careful definition of layers, because a
layer can only use the layers below it
 Less efficient than other approaches
May 15, 2024
Microkernel
 Structures the operating system by
removing all non-essential components
from the kernel and implementing them as
system and user level programs
 Smaller kernel
 If error comes in one microkernel others
will work fine.There are many microkernel

May 15, 2024


Microkernel …
 User mode communicate via passing
message to microkernel
 Easier to maintain operating system code
(enhancement, debugging, etc.)
 More security and reliability
 Mach, MacOS X Server, QNX, and Windows
NT

May 15, 2024


Work Assignment : How OS is easier to port from one
hardware to another in micro kernel OS?
Virtual Machine
How to achieve virtualization ?
We achieve using Hypervisor
Virtual Machines …

Non Virtual Machine Virtual Machine


May 15, 2024
VMware

May 15, 2024


Java Virtual Machine

May 15, 2024


System Design and
Implementation
 Design Goals
 User: operating system should be
convenient to use, easy to learn, reliable,
safe, and fast.
 System designer and administrator:
operating system should be easy to
design, implement, and maintain, as well
as flexible, reliable, error-free, and
May 15, 2024
efficient.
• When a process request for a resourse.
How the resource will be allocated to the
process.that is mechanism. Whether
allocate resource to that process or not
that is policy
• Ex: Car internal part which help to move
forward that is mechanism and 50 km/hr
that is policy
It is easier to port from
one hardware to
another hardware
Introduction to UNIX and Linux
 Written by Dennis Ritchie and Ken Thomsom in at Bell
Labs in 1969
 Initially written in assembly language and a high-level
language called B. Later converted from B to C
language.
 Linux written by Linus Torvalds (an undergraduate
student at the Univ. of Helsinki, Finland) in 1991.
 Most popular operating systems

May 15, 2024


UNIX/Linux File
System
 UNIX has a hierarchical file system structure consisting
of a root directory with other directories and files
hanging under it
 In a command-line user interface, typed commands are
used to navigate the system
 Directories and files are specified by filenames
 os/assignments/assign1.c
 /home/students/ali/courses/os

May 15, 2024


Browsing Directory
Structure
/ The root directory is the directory that
contains all other directories. When a
directory structure is displayed as a
tree, the root directory is at the top.
/bin This directory holds binary executable
files that are essential for correct
operation of the system
/boot This directory includes essential
system boot files including the kernel
image .
May 15, 2024
Browsing Directory
Structure …
/dev This directory contains the devices
available to on the machine

/etc Linux uses this directory to store


system configuration files
/home This is where every user on a Linux
system has a personal directory
/lib Shared libraries and kernel modules
are stored in this directory
May 15, 2024
Browsing Directory
Structure …
/root The home directory for the
superuser
/sbin Utilities used for system
administration (halt, ifconfig, fdisk,
etc.) are stored in this directory
/tmp Used for storing temporary files.
Similar to C:\Windows\Temp.

May 15, 2024


Browsing Directory
Structure …
/usr Typically a shareable, read-only
directory. Contains user
applications and supporting files
for those applications.
/var This directory contains variable
data files such as logs (/var/log),
mail (/var/mail), and spools
(/var/spool) among other things.
May 15, 2024
UNIX/Linux Directory
Hierarchy
/

bin dev home … sbin usr

faculty … students

May 15, 2024


UNIX/Linux Directory
Hierarchy

May 15, 2024

You might also like