SlideShare a Scribd company logo
1 of 17
Unix Internals
OS Architecture

                  Khader Shaik
Unix OS - Agenda
•   Boot Process
•   Shutdown Process
•   Process Management
•   Memory Management
•   File System
•   Networking




                         2
PROM – Programmable ROM
• Small non-volatile memory loaded with vendor
  specific software
• Performs some basic checks (POST) and finds
  the boot device; runs the boot program
  – Power-on Self Test (POST)
• Usually Boot program is stored on Block 0 (boot
  sector) of a Boot disk
• Boot program reads and loads the kernel
  program
• System can be booted from any other devices
  as well if you have access to ROM
  > boot cdrom (on Sun)
• More details are Vendor specific

                                                    3
Boot Process - Steps
• Kernel checks the Memory Availability
  – For eg: on Solaris kernel program is located under -
    /kernel/unix
• Probes & Configures hardware devices
• Updates the entries in /dev directory
  – /dev directory holds the information on all hardware
    devices installed
• Sets up all RAM tables to hold the processes
  information, memory allocation and open files
  etc
• At the of the booting KERNEL creates the init
  process

                                                           4
Dummy Processes
• Process that cannot be killed is known as
  DUMMY process
• Used for crucial system functions
• Created by Kernel during booting process
  – Part of the kernel
• Some of the samples are:
  – swapping services (xsched)
  – virtual memory paging services (pageout/vhand)
  – periodic buffer flushing service (bdflush)
• To see these process run command > ps -ef


                                                     5
OS Run Levels
• OS runs in different levels indicating a
  specific mode
• init command changes the run level of OS
  (init process is different from init
  command)
• Different levels have the different limited
  set of processes running
  – /etc/inittab – configuration file contains this
    info
• Different sample levels
 0 – Halt           1 – single user mode   2 – Multi-user without NFS
 3 – Full multi-user 4 – unused            5 – X11 graphical mode
 6 – Reboot etc.
                                                                        6
Process Management
•   Process Hierarchy
•   Process Creations
•   Process Management
•   Process Status
•   Communicating with Processes




                                   7
Process Hierarchy
• KERNEL process is created as part of the
  booting
• KERNEL first loads the init process
• All other processes are created by init
• Each process is given an unique process id
  (PID)
  – PID of init is 1
  – PID of kernel is 0 (zero)
• Each process is associated with its creator
  (parent) – identified by the Parent Process ID
  (PPID)
• init process is mother of all processes

                                                   8
Process Hierarchy ..cont
• When parent process of any process dies,
  it will be linked to init process as its
  parent
• Each process runs with a specific priority
  (PRI)
• For Eg:
  – Solaris Priorities vary from -20 to +20;
  – ‘-20’ being highest and ‘+20’ being the lowest
• ‘ps’ command lists the current processes
  running
  – ‘ps –ax’
                                                     9
Process Creation
• New processes are created using either fork or
  exec command
• fork creates an independent process
  – Except kernel everything else is created using fork
• exec creates a new process as a sub-process
  (thread) of the calling program
  – It shares the memory and other resources of the
    parent process
• Eg: a shell script with find command in it
  – Shell creates the independent (fork) process to
    execute the Shell script
  – Script process creates the sub-process (using exec)
    to execute the find command                           10
Process Creation ..
• Kernel allocates the memory to the new process
  known as ADDRESS SPACE
• Address Space contains four main segments
  – Text – stores the program instructions
  – Data – contains program variables (initialized)
    (dynamically grows?)
  – BSS/Heap Memory - contains un-initialized program
    variables (dynamically shrinking as used)
  – Free Store – unused memory; used as programs
    allocates
  – Stack – stores local variables and function
    parameters (dynamically grows)

                                                        11
Process Address Space (each process)

          Variable Size      Stack Memory


          Variable Size
          (grows & shrinks   Free Store
           as used)

           Variable Size     Heap Memory


            Fixed Size       Data Segment



            Fixed Size       Text Segment




                                            12
Process Execution Modes
• Kernel Mode
  – When process is executing kernel instructions is
    known as in KERNEL MODE
  – Control transfers to the Kernel and kernel carries out
    the instructions on behalf of the User process
  – During this mode, process can access entire Address
    Space of any process
  – Eg: User process is making a System call, interrupt,
    generating exception etc
• User Mode
  – Process created by user and executing in CPU is
    known as in USER MODE
  – It can access only its Address space and can’t
    access any other user’s space                        13
Various Process States
•   Created
•   Ready to run in Memory
•   Ready to run in Swap
•   Asleep in memory
•   Sleep, swapped
•   User Running
•   Kernel Running
•   Preempted
•   Zombie


                             14
Process Life Cycle




                     15
Process Interruptions – Two Types

• Interrupt - Caused by some event that is
  external to and asynchronous to the
  currently running process
  – Eg: Completion of IO.
• Trap - Error or exception condition
  generated within the currently running
  process.
  – Eg: illegal access to a file, arithmetic
    exception.
• ?(supervisor call) : explicit interruption
                                               16
Common SIGNALS
• SIGHUP - Hang-up       • SIGSYS - Bad argument
• SIGINT- Interrupt        to system call
• SIGQIT - Quit          • SIGPIPE - Write on pipe
• SIGINS - Illegal         with no one to read it
  Instruction            • SIGTERM - Software
• SIGTRAP - Trace Trap     termination signal from kill
• SIGKILL - Kill         • SIGSTOP - Stop signal
                         • For more info -
                           /usr/include/sys/signal.h



                                                    17

More Related Content

What's hot

What is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelWhat is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelNeel Parikh
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingTushar B Kute
 
Kernel mode vs user mode in linux
Kernel mode vs user mode in linuxKernel mode vs user mode in linux
Kernel mode vs user mode in linuxSiddique Ibrahim
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1NAILBITER
 
What is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And ArchitectureWhat is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And Architecturepec2013
 
Unit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-pptUnit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-pptRahul Mashal
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and PropertiesSaadi Rahman
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
KERNAL ARCHITECTURE
KERNAL ARCHITECTUREKERNAL ARCHITECTURE
KERNAL ARCHITECTURElakshmipanat
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module ProgrammingSaurabh Bangad
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programmingVandana Salve
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Ahmed El-Arabawy
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
WELCOME TO THE CORE OF UNIX OPERATING SYSTEM
WELCOME TO THE CORE OF UNIX OPERATING SYSTEMWELCOME TO THE CORE OF UNIX OPERATING SYSTEM
WELCOME TO THE CORE OF UNIX OPERATING SYSTEMNarendra Mohan Mishra
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux KernelStryker King
 

What's hot (20)

What is Kernel, basic idea of kernel
What is Kernel, basic idea of kernelWhat is Kernel, basic idea of kernel
What is Kernel, basic idea of kernel
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Kernel mode vs user mode in linux
Kernel mode vs user mode in linuxKernel mode vs user mode in linux
Kernel mode vs user mode in linux
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
 
What is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And ArchitectureWhat is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And Architecture
 
Unit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-pptUnit 1-a-brief-history-of-unix-ppt
Unit 1-a-brief-history-of-unix-ppt
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
KERNAL ARCHITECTURE
KERNAL ARCHITECTUREKERNAL ARCHITECTURE
KERNAL ARCHITECTURE
 
Ch2
Ch2Ch2
Ch2
 
Unix kernal
Unix kernalUnix kernal
Unix kernal
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module Programming
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
WELCOME TO THE CORE OF UNIX OPERATING SYSTEM
WELCOME TO THE CORE OF UNIX OPERATING SYSTEMWELCOME TO THE CORE OF UNIX OPERATING SYSTEM
WELCOME TO THE CORE OF UNIX OPERATING SYSTEM
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux Kernel
 

Viewers also liked

Viewers also liked (12)

Unix operating system
Unix operating systemUnix operating system
Unix operating system
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 
Unix
UnixUnix
Unix
 
Vi editor
Vi   editorVi   editor
Vi editor
 
Vi Editor
Vi EditorVi Editor
Vi Editor
 
Vi editor in linux
Vi editor in linuxVi editor in linux
Vi editor in linux
 
Unix slideshare
Unix slideshareUnix slideshare
Unix slideshare
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 

Similar to Unix Internals OS Architecture

Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management Duressa Teshome
 
Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)Gaurav Aggarwal
 
Operating Systems & Applications
Operating Systems & ApplicationsOperating Systems & Applications
Operating Systems & ApplicationsMaulen Bale
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentationchnrketan
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfIxtiyorTeshaboyev
 
Erroneous co-routines can block system Formal interfaces slow down system
Erroneous co-routines can block system Formal  interfaces slow down systemErroneous co-routines can block system Formal  interfaces slow down system
Erroneous co-routines can block system Formal interfaces slow down systemjeronimored
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating SystemFatima Qayyum
 
opearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxopearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxssuser3dfcef
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxWO Community
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介lclsg123
 
Processes in unix
Processes in unixProcesses in unix
Processes in unixmiau_max
 

Similar to Unix Internals OS Architecture (20)

Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Operating Systems & Applications
Operating Systems & ApplicationsOperating Systems & Applications
Operating Systems & Applications
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Erroneous co-routines can block system Formal interfaces slow down system
Erroneous co-routines can block system Formal  interfaces slow down systemErroneous co-routines can block system Formal  interfaces slow down system
Erroneous co-routines can block system Formal interfaces slow down system
 
Kernal
KernalKernal
Kernal
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Os
OsOs
Os
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
opearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxopearating system notes mumbai university.pptx
opearating system notes mumbai university.pptx
 
Unix Operaring System
Unix Operaring SystemUnix Operaring System
Unix Operaring System
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS Linux
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Processes in unix
Processes in unixProcesses in unix
Processes in unix
 
Os introduction
Os introductionOs introduction
Os introduction
 
Os introduction
Os introductionOs introduction
Os introduction
 

More from Khader Shaik

The Dodd Frank & Derivatives market - Chapter 09
The Dodd Frank & Derivatives market - Chapter 09The Dodd Frank & Derivatives market - Chapter 09
The Dodd Frank & Derivatives market - Chapter 09Khader Shaik
 
Fixed Income Trading Platform Architecture
Fixed Income Trading Platform ArchitectureFixed Income Trading Platform Architecture
Fixed Income Trading Platform ArchitectureKhader Shaik
 
Interest Rate Derivatives
Interest Rate DerivativesInterest Rate Derivatives
Interest Rate DerivativesKhader Shaik
 
Securities Trade Life Cycle
Securities Trade Life CycleSecurities Trade Life Cycle
Securities Trade Life CycleKhader Shaik
 
Introduction to Portfolio Management
Introduction to Portfolio ManagementIntroduction to Portfolio Management
Introduction to Portfolio ManagementKhader Shaik
 
MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)Khader Shaik
 
Inside Financial Markets
Inside Financial MarketsInside Financial Markets
Inside Financial MarketsKhader Shaik
 
Introduction to Derivatives Market
Introduction to  Derivatives MarketIntroduction to  Derivatives Market
Introduction to Derivatives MarketKhader Shaik
 
VBA & ADO MS Access – Part 2
VBA & ADO  MS Access – Part 2VBA & ADO  MS Access – Part 2
VBA & ADO MS Access – Part 2Khader Shaik
 
Fixed Income Trading and Platform Architecture
Fixed Income Trading and Platform ArchitectureFixed Income Trading and Platform Architecture
Fixed Income Trading and Platform ArchitectureKhader Shaik
 
Structured Products
Structured ProductsStructured Products
Structured ProductsKhader Shaik
 
Fixed Income Markets
Fixed Income MarketsFixed Income Markets
Fixed Income MarketsKhader Shaik
 
01 fi market_overview
01 fi market_overview01 fi market_overview
01 fi market_overviewKhader Shaik
 
Fixed Income Trading System Architecture
Fixed Income Trading System ArchitectureFixed Income Trading System Architecture
Fixed Income Trading System ArchitectureKhader Shaik
 
Introduction To Fixed Income Markets
Introduction To Fixed Income MarketsIntroduction To Fixed Income Markets
Introduction To Fixed Income MarketsKhader Shaik
 

More from Khader Shaik (15)

The Dodd Frank & Derivatives market - Chapter 09
The Dodd Frank & Derivatives market - Chapter 09The Dodd Frank & Derivatives market - Chapter 09
The Dodd Frank & Derivatives market - Chapter 09
 
Fixed Income Trading Platform Architecture
Fixed Income Trading Platform ArchitectureFixed Income Trading Platform Architecture
Fixed Income Trading Platform Architecture
 
Interest Rate Derivatives
Interest Rate DerivativesInterest Rate Derivatives
Interest Rate Derivatives
 
Securities Trade Life Cycle
Securities Trade Life CycleSecurities Trade Life Cycle
Securities Trade Life Cycle
 
Introduction to Portfolio Management
Introduction to Portfolio ManagementIntroduction to Portfolio Management
Introduction to Portfolio Management
 
MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)
 
Inside Financial Markets
Inside Financial MarketsInside Financial Markets
Inside Financial Markets
 
Introduction to Derivatives Market
Introduction to  Derivatives MarketIntroduction to  Derivatives Market
Introduction to Derivatives Market
 
VBA & ADO MS Access – Part 2
VBA & ADO  MS Access – Part 2VBA & ADO  MS Access – Part 2
VBA & ADO MS Access – Part 2
 
Fixed Income Trading and Platform Architecture
Fixed Income Trading and Platform ArchitectureFixed Income Trading and Platform Architecture
Fixed Income Trading and Platform Architecture
 
Structured Products
Structured ProductsStructured Products
Structured Products
 
Fixed Income Markets
Fixed Income MarketsFixed Income Markets
Fixed Income Markets
 
01 fi market_overview
01 fi market_overview01 fi market_overview
01 fi market_overview
 
Fixed Income Trading System Architecture
Fixed Income Trading System ArchitectureFixed Income Trading System Architecture
Fixed Income Trading System Architecture
 
Introduction To Fixed Income Markets
Introduction To Fixed Income MarketsIntroduction To Fixed Income Markets
Introduction To Fixed Income Markets
 

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Unix Internals OS Architecture

  • 2. Unix OS - Agenda • Boot Process • Shutdown Process • Process Management • Memory Management • File System • Networking 2
  • 3. PROM – Programmable ROM • Small non-volatile memory loaded with vendor specific software • Performs some basic checks (POST) and finds the boot device; runs the boot program – Power-on Self Test (POST) • Usually Boot program is stored on Block 0 (boot sector) of a Boot disk • Boot program reads and loads the kernel program • System can be booted from any other devices as well if you have access to ROM > boot cdrom (on Sun) • More details are Vendor specific 3
  • 4. Boot Process - Steps • Kernel checks the Memory Availability – For eg: on Solaris kernel program is located under - /kernel/unix • Probes & Configures hardware devices • Updates the entries in /dev directory – /dev directory holds the information on all hardware devices installed • Sets up all RAM tables to hold the processes information, memory allocation and open files etc • At the of the booting KERNEL creates the init process 4
  • 5. Dummy Processes • Process that cannot be killed is known as DUMMY process • Used for crucial system functions • Created by Kernel during booting process – Part of the kernel • Some of the samples are: – swapping services (xsched) – virtual memory paging services (pageout/vhand) – periodic buffer flushing service (bdflush) • To see these process run command > ps -ef 5
  • 6. OS Run Levels • OS runs in different levels indicating a specific mode • init command changes the run level of OS (init process is different from init command) • Different levels have the different limited set of processes running – /etc/inittab – configuration file contains this info • Different sample levels 0 – Halt 1 – single user mode 2 – Multi-user without NFS 3 – Full multi-user 4 – unused 5 – X11 graphical mode 6 – Reboot etc. 6
  • 7. Process Management • Process Hierarchy • Process Creations • Process Management • Process Status • Communicating with Processes 7
  • 8. Process Hierarchy • KERNEL process is created as part of the booting • KERNEL first loads the init process • All other processes are created by init • Each process is given an unique process id (PID) – PID of init is 1 – PID of kernel is 0 (zero) • Each process is associated with its creator (parent) – identified by the Parent Process ID (PPID) • init process is mother of all processes 8
  • 9. Process Hierarchy ..cont • When parent process of any process dies, it will be linked to init process as its parent • Each process runs with a specific priority (PRI) • For Eg: – Solaris Priorities vary from -20 to +20; – ‘-20’ being highest and ‘+20’ being the lowest • ‘ps’ command lists the current processes running – ‘ps –ax’ 9
  • 10. Process Creation • New processes are created using either fork or exec command • fork creates an independent process – Except kernel everything else is created using fork • exec creates a new process as a sub-process (thread) of the calling program – It shares the memory and other resources of the parent process • Eg: a shell script with find command in it – Shell creates the independent (fork) process to execute the Shell script – Script process creates the sub-process (using exec) to execute the find command 10
  • 11. Process Creation .. • Kernel allocates the memory to the new process known as ADDRESS SPACE • Address Space contains four main segments – Text – stores the program instructions – Data – contains program variables (initialized) (dynamically grows?) – BSS/Heap Memory - contains un-initialized program variables (dynamically shrinking as used) – Free Store – unused memory; used as programs allocates – Stack – stores local variables and function parameters (dynamically grows) 11
  • 12. Process Address Space (each process) Variable Size Stack Memory Variable Size (grows & shrinks Free Store as used) Variable Size Heap Memory Fixed Size Data Segment Fixed Size Text Segment 12
  • 13. Process Execution Modes • Kernel Mode – When process is executing kernel instructions is known as in KERNEL MODE – Control transfers to the Kernel and kernel carries out the instructions on behalf of the User process – During this mode, process can access entire Address Space of any process – Eg: User process is making a System call, interrupt, generating exception etc • User Mode – Process created by user and executing in CPU is known as in USER MODE – It can access only its Address space and can’t access any other user’s space 13
  • 14. Various Process States • Created • Ready to run in Memory • Ready to run in Swap • Asleep in memory • Sleep, swapped • User Running • Kernel Running • Preempted • Zombie 14
  • 16. Process Interruptions – Two Types • Interrupt - Caused by some event that is external to and asynchronous to the currently running process – Eg: Completion of IO. • Trap - Error or exception condition generated within the currently running process. – Eg: illegal access to a file, arithmetic exception. • ?(supervisor call) : explicit interruption 16
  • 17. Common SIGNALS • SIGHUP - Hang-up • SIGSYS - Bad argument • SIGINT- Interrupt to system call • SIGQIT - Quit • SIGPIPE - Write on pipe • SIGINS - Illegal with no one to read it Instruction • SIGTERM - Software • SIGTRAP - Trace Trap termination signal from kill • SIGKILL - Kill • SIGSTOP - Stop signal • For more info - /usr/include/sys/signal.h 17