SlideShare a Scribd company logo
Unix operating system
Present By:-
aBhay Panchal
What is Operating System..??
•   The operating system (OS) is the program which starts up when you turn on your
    computer and runs underneath all other programs - without it nothing would
    happen at all.

•   In simple terms, an operating system is a manager. It manages all the available
    resources on a computer, from the CPU, to memory, to hard disk accesses.

•   Tasks the operating system must perform:
     –   Control Hardware
     –   Run Applications
     –   Manage Data and Files
     –   Security
Different Operating System…
•   Windows
•   Mac
•   Unix
•   Linux
•   Android
UNIX History…
• The UNIX operating system was born in the late 1960s. It originally began
  as a one man project led by Ken Thompson of Bell Labs, and has since
  grown to become the most widely used operating system.

• In the time since UNIX was first developed, it has gone through many
  different generations and even mutations.
    – Some differ substantially from the original version, like Berkeley Software
      Distribution (BSD) or Linux.
    – Others, still contain major portions that are based on the original source code.
Structure of Unix
General Characteristics of UNIX as an
           Operating System (OS)
• Multi-user & Multi-tasking - most versions of UNIX are capable of
  allowing multiple users to log onto the system, and have each run multiple
  tasks. This is standard for most modern OSs.

• Over 30 Years Old - UNIX is over 30 years old and it's popularity and use is
  still high. Over these years, many variations have spawned off and many
  have died off, but most modern UNIX systems can be traced back to the
  original versions. It has endured the test of time. For reference, Windows
  at best is half as old (Windows 1.0 was released in the mid 80s, but it was
  not stable or very complete until the 3.x family, which was released in the
  early 90s).
General Characteristics of UNIX as an
           Operating System (OS)
• Large Number of Applications – there are an enormous amount of
  applications available for UNIX operating systems. They range from
  commercial applications such as CAD, Maya, WordPerfect, to many free
  applications.

• Free Applications and Even a Free Operating System - of all of the
  applications available under UNIX, many of them are free. The compilers
  and interpreters that we use in most of the programming courses here at
  UMBC can be downloaded free of charge. Most of the development that
  we do in programming courses is done under the Linux OS.
General Characteristics of UNIX as an
           Operating System (OS)
• Less Resource Intensive - in general, most UNIX installations tend to be
  much less demanding on system resources. In many cases, the old family
  computer that can barely run Windows is more than sufficient to run the
  latest version of Linux.

• Internet Development - Much of the backbone of the Internet is run by
  UNIX servers. Many of the more general web servers run UNIX with the
  Apache web server - another free application
Flavors of UNIX
• AIX - developed by IBM for use on its mainframe computers
• BSD/OS - developed by Wind River for Intel processors
• HP-UX - developed by Hewlett-Packard for its HP 9000 series of business
  servers
• IRIX - developed by SGI for applications that use 3-D visualization and
  virtual reality
• QNX - a real time operating system developed by QNX Software Systems
  primarily for use in embedded systems
• Solaris - developed by Sun Microsystems for the SPARC platform and the
  most widely used proprietary flavor for web servers
• Tru64 - developed by Compaq for the Alpha processor
UNIX Interfaces
Graphical User Interfaces (GUIs)
• When you logon locally, you are presented with graphical environment.

• You start at a graphical login screen. You must enter your username and
  password. You also the have the option to choose from a couple session
  types. Mainly you have the choice between Gnome and KDE.

• Once you enter in your username and password, you are then presented
  with a graphical environment that looks like one of the following...
UNIX Interfaces
Command Line Interface
• You also have access to some UNIX servers as well.
   – You can logon from virtually any computer that has internet access
      whether it is Windows, Mac, or UNIX itself.
• In this case you are communicating through a local terminal to one of
  these remote servers.
   – All of the commands actually execute on the remote server.
   – It is also possible to open up graphical applications through this
      window, but that requires a good bit more setup and software.
Process Management
• Operating system functions executes within user process.

• 2 modes of execution
    – User mode
    – Kernel mode


• 2 types of processes are available
    – System processes (Execute OS code)
    – User processes (Execute user program code)


• System call is used to transfer form user mode to system mode.
Process State in UNIX
• User running             Execute in use mode

• Kernel running           Execute in kernel mode

• Ready to run in memory   ready to run as soon as the kernel
                           schedules it

• Asleep in memory         unable to execute until event occurs.

• Ready to run, swapped    process is ready to run, but the
                           swapper must swap process into main
                           memory before kernel can schedule it
                           to execute.
Process State in UNIX
• Sleeping , swapped   a process is awaiting an event and has
                       been swapped to secondary storage.

• Preempted            process is returning from kernel to user
                       mode, but the kernel preempts it and
  does                 a process switch to schedule another
                       process
• Created              process is newly created and not yet run.

• Zombie               process no longer exists, but it leaves a
                       record from its parent process to collect.
Process Scheduling Queues
• Job queue
• Ready queue
• Device queues.
Types of Processes in UNIX
Mainly 3 types
– User process
– Daemon process
– Kernel process

 Daemon process
• Performs the function in a system wide basis. The function can be of any auxiliary
  kind but they are vital in controlling the computational environment of the system.
• Example Print spooling, Network Management.
• Once created Daemon process can exist throughout the life time of the Operating
  System.
System calls in UNIX
• Fork(): -This system call create new process.

• Exec(): -This system call used after a fork to replace the process memory
  space with a new program.

• Wait():-This system call moves a process off the ready queue until the
  termination of the child.
Interesting signals in UNIX
   SIGCHLD   Child process died or suspended
   SIGFPE    Arithmetic fault
   SIGILL    Illegal instruction
   SIGINT    tty interrupt (Control C)
   SIGKILL   Kill process
   SIGSEGV   Segmentation fault
   SIGSYS    Invalid System call
   SIGXCPU   Exceeds CPU limit
   SIGXFSZ   Exceeds file size limit
Memory
• Primary memory is a precious resource that frequently cannot
  contain all active processes in the system

• The memory management system decides which processes
  should reside (at least partially) in main memory

• It monitors the amount of available primary memory and may
  periodically write processes to a secondary device called the
  swap device to provide more space in primary memory

• At a later time, the kernel reads the data from swap device
  back to main memory
UNIX Memory Management Policies
• Swapping
  – Easy to implement
  – Less system overhead


• Demand Paging
  – Greater flexibility
Swapping
• The swap device is a block device in a configurable section of a disk

• Kernel allocates contiguous space on the swap device without
  fragmentation

• It maintains free space of the swap device in an in-core table, called map

• The kernel treats each unit of the swap map as group of disk blocks

• As kernel allocates and frees resources, it updates the map accordingly
Swapping Process Out
• The kernel must gather the page addresses of data at primary memory to
  be swapped out

• Kernel copies the physical memory assigned to a process to the allocated
  space on the swap device

• The mapping between physical memory and swap device is kept in page
  table entry
Demand Paging
• Not all page of process resides in memory Locality

• When a process accesses a page that is not part of its working set, it incurs
  a page fault.

• The kernel suspends the execution of the process until it reads the page
  into memory and makes it accessible to the process
Data Structure for Demand Paging
• Page table entry

• Disk block descriptors

• Page frame data table

• Swap use table
File Management in UNIX
In UNIX there are three basic types of files:
• Ordinary Files: An ordinary file is a file on the system that contains
    data, text, or program instructions. In this tutorial, you look at working
    with ordinary files.
• Directories: Directories store both special and ordinary files. For users
    familiar with Windows or Mac OS, UNIX directories are equivalent to
    folders.
• Special Files: Some special files provide access to hardware such as hard
    drives, CD-ROM drives, modems, and Ethernet adapters. Other special
    files are similar to aliases or shortcuts and enable you to access a single
    file using different names.
File Management in UNIX
File Access Modes:
 Read: Grants the capability to read ie. view the contents of
   the file.

 Write:Grants the capability to modify, or remove the content
  of the file.

 Execute:User with execute permissions can run a file as a
  program.
File Management in UNIX
Directory Access Modes:
 Read: Access to a directory means that the user can
  read the contents. The user can look at the filenames
  inside the directory.
 Write: Access means that the user can add or delete
  files to the contents of the directory.
 Execute: Executing a directory doesn't really make a lot
  of sense so think of this as a traverse permission.
  A user must have execute access to the bin directory in
  order to execute or command.
File Management in UNIX
Starting a Process:
• Foreground Processes:
o By default, every process that you start runs in the foreground. It gets its
   input from the keyboard and sends its output to the screen.
• Background Processes:
o A background process runs without being connected to your keyboard. If
   the background process requires any keyboard input, it waits.
o The advantage of running a process in the background is that you can run
   other commands; you do not have to wait until it completes to start
   another!
File Management in UNIX
Stopping Processes:
• Ending a process can be done in several different ways. Often, from a
  console-based command, sending a CTRL + C keystroke (the default
  interrupt character) will exit the command. This works when process is
  running in foreground mode.
• If a process is running in background mode then first you would need to
  get its Job ID using ps command and after that you can use kill command
  to kill the process.
UNIX Security
•   Common Sense Security
•   File Permissions
•   Login daemons
•   Non-login daemons
•   Stack Smashing
•   Safe Scripts
Benefits of UNIX
Benefits in different ways                               %
Flexibility                                              70%
Freedom to choose IT from different vendors              67%
Products from different vendors work together            66%
Access across multi-vendor environments                  65%
Protect investment in existing computer systems          61%
Ability to use/share information anywhere in the world   59%
Cost savings                                             54%
Interoperability/portability across various platforms    54%
Organizational change not constrained by IT system       49%
Cost of ownership                                        49%
In Summary…
• When the history of the information age is written, the
  extraordinary dynamics of the UNIX system marketplace will be
  seen as playing an important role. The UNIX system was
  developed at just the right time and place to be the critical
  enabler for a revolution in information technology. Client/server
  architectures, the Internet, object databases, heterogeneous
  transaction processing, and Web computing all emerged on the
  shoulders of the UNIX system.
Unix operating system

More Related Content

PPTX
Unix Operating System
PPTX
Unix ppt
PPTX
UNIX Operating System
PPTX
Machine Learning With Python | Machine Learning Algorithms | Machine Learning...
PPTX
Food order
PPTX
DeadLock in Operating-Systems
PPTX
DATA VISUALIZATION.pptx
PPTX
SDLC Models
Unix Operating System
Unix ppt
UNIX Operating System
Machine Learning With Python | Machine Learning Algorithms | Machine Learning...
Food order
DeadLock in Operating-Systems
DATA VISUALIZATION.pptx
SDLC Models

What's hot (20)

PPT
6 multiprogramming & time sharing
PPTX
Operating system critical section
PDF
Multithreading
PPTX
Unix operating system architecture with file structure
PPTX
Operating system
PPTX
PPTX
System calls
PDF
OS - Process Concepts
PPTX
Segmentation in operating systems
PPT
Case study windows
PPTX
Pipeline processing and space time diagram
PPTX
Shortest Job First
PPTX
Types of operating system
PDF
Introduction to Operating Systems
PDF
Semaphores
PPTX
Presentation on Operating System & its Components
PPTX
INTER PROCESS COMMUNICATION (IPC).pptx
PPTX
File Transfer Protocol
PPTX
Operating systems unix
6 multiprogramming & time sharing
Operating system critical section
Multithreading
Unix operating system architecture with file structure
Operating system
System calls
OS - Process Concepts
Segmentation in operating systems
Case study windows
Pipeline processing and space time diagram
Shortest Job First
Types of operating system
Introduction to Operating Systems
Semaphores
Presentation on Operating System & its Components
INTER PROCESS COMMUNICATION (IPC).pptx
File Transfer Protocol
Operating systems unix
Ad

Viewers also liked (15)

PPTX
Unix Operating System
PPTX
UNIX Operating System
PPT
PPTX
Historia de ms-dos
PPT
Introduction to ms dos
PDF
Processes in unix
PPTX
Unix Process management
PPT
Unix memory management
PPT
Linux Introduction
PPT
comparing windows and linux ppt
PPTX
Linux v/s Windows
PPT
Case study linux
PPT
MS DOS
PPTX
Disk operating system
Unix Operating System
UNIX Operating System
Historia de ms-dos
Introduction to ms dos
Processes in unix
Unix Process management
Unix memory management
Linux Introduction
comparing windows and linux ppt
Linux v/s Windows
Case study linux
MS DOS
Disk operating system
Ad

Similar to Unix operating system (20)

PDF
unixoperatingsystem-130327073532-phpapp01.pdf
PPTX
Unix Operaring System
PPTX
Linux architecture
PPTX
Operating systems (For CBSE School Students)
PPTX
introduction to Linux operating system .pptx
PDF
Lecture 1 - introduction OS learner .pdf
PDF
Linux for embedded_systems
PPTX
OS presentation#1.pptx
PPT
Chap2
PPT
Lecture 9
PPTX
Introduction to Operating system CBSE
PPT
PPT
Operating system.ppt (1)
PPTX
Operating Systems & Applications
PPTX
Lecture 4.pptx
PDF
os_1.pdf
PPTX
unitios-22112405585Operational 3-5fc1b7da.pptx
PPT
Linux操作系统01 简介
PPT
Linux basics
unixoperatingsystem-130327073532-phpapp01.pdf
Unix Operaring System
Linux architecture
Operating systems (For CBSE School Students)
introduction to Linux operating system .pptx
Lecture 1 - introduction OS learner .pdf
Linux for embedded_systems
OS presentation#1.pptx
Chap2
Lecture 9
Introduction to Operating system CBSE
Operating system.ppt (1)
Operating Systems & Applications
Lecture 4.pptx
os_1.pdf
unitios-22112405585Operational 3-5fc1b7da.pptx
Linux操作系统01 简介
Linux basics

Unix operating system

  • 3. What is Operating System..?? • The operating system (OS) is the program which starts up when you turn on your computer and runs underneath all other programs - without it nothing would happen at all. • In simple terms, an operating system is a manager. It manages all the available resources on a computer, from the CPU, to memory, to hard disk accesses. • Tasks the operating system must perform: – Control Hardware – Run Applications – Manage Data and Files – Security
  • 4. Different Operating System… • Windows • Mac • Unix • Linux • Android
  • 5. UNIX History… • The UNIX operating system was born in the late 1960s. It originally began as a one man project led by Ken Thompson of Bell Labs, and has since grown to become the most widely used operating system. • In the time since UNIX was first developed, it has gone through many different generations and even mutations. – Some differ substantially from the original version, like Berkeley Software Distribution (BSD) or Linux. – Others, still contain major portions that are based on the original source code.
  • 7. General Characteristics of UNIX as an Operating System (OS) • Multi-user & Multi-tasking - most versions of UNIX are capable of allowing multiple users to log onto the system, and have each run multiple tasks. This is standard for most modern OSs. • Over 30 Years Old - UNIX is over 30 years old and it's popularity and use is still high. Over these years, many variations have spawned off and many have died off, but most modern UNIX systems can be traced back to the original versions. It has endured the test of time. For reference, Windows at best is half as old (Windows 1.0 was released in the mid 80s, but it was not stable or very complete until the 3.x family, which was released in the early 90s).
  • 8. General Characteristics of UNIX as an Operating System (OS) • Large Number of Applications – there are an enormous amount of applications available for UNIX operating systems. They range from commercial applications such as CAD, Maya, WordPerfect, to many free applications. • Free Applications and Even a Free Operating System - of all of the applications available under UNIX, many of them are free. The compilers and interpreters that we use in most of the programming courses here at UMBC can be downloaded free of charge. Most of the development that we do in programming courses is done under the Linux OS.
  • 9. General Characteristics of UNIX as an Operating System (OS) • Less Resource Intensive - in general, most UNIX installations tend to be much less demanding on system resources. In many cases, the old family computer that can barely run Windows is more than sufficient to run the latest version of Linux. • Internet Development - Much of the backbone of the Internet is run by UNIX servers. Many of the more general web servers run UNIX with the Apache web server - another free application
  • 10. Flavors of UNIX • AIX - developed by IBM for use on its mainframe computers • BSD/OS - developed by Wind River for Intel processors • HP-UX - developed by Hewlett-Packard for its HP 9000 series of business servers • IRIX - developed by SGI for applications that use 3-D visualization and virtual reality • QNX - a real time operating system developed by QNX Software Systems primarily for use in embedded systems • Solaris - developed by Sun Microsystems for the SPARC platform and the most widely used proprietary flavor for web servers • Tru64 - developed by Compaq for the Alpha processor
  • 11. UNIX Interfaces Graphical User Interfaces (GUIs) • When you logon locally, you are presented with graphical environment. • You start at a graphical login screen. You must enter your username and password. You also the have the option to choose from a couple session types. Mainly you have the choice between Gnome and KDE. • Once you enter in your username and password, you are then presented with a graphical environment that looks like one of the following...
  • 12. UNIX Interfaces Command Line Interface • You also have access to some UNIX servers as well. – You can logon from virtually any computer that has internet access whether it is Windows, Mac, or UNIX itself. • In this case you are communicating through a local terminal to one of these remote servers. – All of the commands actually execute on the remote server. – It is also possible to open up graphical applications through this window, but that requires a good bit more setup and software.
  • 13. Process Management • Operating system functions executes within user process. • 2 modes of execution – User mode – Kernel mode • 2 types of processes are available – System processes (Execute OS code) – User processes (Execute user program code) • System call is used to transfer form user mode to system mode.
  • 14. Process State in UNIX • User running Execute in use mode • Kernel running Execute in kernel mode • Ready to run in memory ready to run as soon as the kernel schedules it • Asleep in memory unable to execute until event occurs. • Ready to run, swapped process is ready to run, but the swapper must swap process into main memory before kernel can schedule it to execute.
  • 15. Process State in UNIX • Sleeping , swapped a process is awaiting an event and has been swapped to secondary storage. • Preempted process is returning from kernel to user mode, but the kernel preempts it and does a process switch to schedule another process • Created process is newly created and not yet run. • Zombie process no longer exists, but it leaves a record from its parent process to collect.
  • 16. Process Scheduling Queues • Job queue • Ready queue • Device queues.
  • 17. Types of Processes in UNIX Mainly 3 types – User process – Daemon process – Kernel process  Daemon process • Performs the function in a system wide basis. The function can be of any auxiliary kind but they are vital in controlling the computational environment of the system. • Example Print spooling, Network Management. • Once created Daemon process can exist throughout the life time of the Operating System.
  • 18. System calls in UNIX • Fork(): -This system call create new process. • Exec(): -This system call used after a fork to replace the process memory space with a new program. • Wait():-This system call moves a process off the ready queue until the termination of the child.
  • 19. Interesting signals in UNIX  SIGCHLD Child process died or suspended  SIGFPE Arithmetic fault  SIGILL Illegal instruction  SIGINT tty interrupt (Control C)  SIGKILL Kill process  SIGSEGV Segmentation fault  SIGSYS Invalid System call  SIGXCPU Exceeds CPU limit  SIGXFSZ Exceeds file size limit
  • 20. Memory • Primary memory is a precious resource that frequently cannot contain all active processes in the system • The memory management system decides which processes should reside (at least partially) in main memory • It monitors the amount of available primary memory and may periodically write processes to a secondary device called the swap device to provide more space in primary memory • At a later time, the kernel reads the data from swap device back to main memory
  • 21. UNIX Memory Management Policies • Swapping – Easy to implement – Less system overhead • Demand Paging – Greater flexibility
  • 22. Swapping • The swap device is a block device in a configurable section of a disk • Kernel allocates contiguous space on the swap device without fragmentation • It maintains free space of the swap device in an in-core table, called map • The kernel treats each unit of the swap map as group of disk blocks • As kernel allocates and frees resources, it updates the map accordingly
  • 23. Swapping Process Out • The kernel must gather the page addresses of data at primary memory to be swapped out • Kernel copies the physical memory assigned to a process to the allocated space on the swap device • The mapping between physical memory and swap device is kept in page table entry
  • 24. Demand Paging • Not all page of process resides in memory Locality • When a process accesses a page that is not part of its working set, it incurs a page fault. • The kernel suspends the execution of the process until it reads the page into memory and makes it accessible to the process
  • 25. Data Structure for Demand Paging • Page table entry • Disk block descriptors • Page frame data table • Swap use table
  • 26. File Management in UNIX In UNIX there are three basic types of files: • Ordinary Files: An ordinary file is a file on the system that contains data, text, or program instructions. In this tutorial, you look at working with ordinary files. • Directories: Directories store both special and ordinary files. For users familiar with Windows or Mac OS, UNIX directories are equivalent to folders. • Special Files: Some special files provide access to hardware such as hard drives, CD-ROM drives, modems, and Ethernet adapters. Other special files are similar to aliases or shortcuts and enable you to access a single file using different names.
  • 27. File Management in UNIX File Access Modes:  Read: Grants the capability to read ie. view the contents of the file.  Write:Grants the capability to modify, or remove the content of the file.  Execute:User with execute permissions can run a file as a program.
  • 28. File Management in UNIX Directory Access Modes:  Read: Access to a directory means that the user can read the contents. The user can look at the filenames inside the directory.  Write: Access means that the user can add or delete files to the contents of the directory.  Execute: Executing a directory doesn't really make a lot of sense so think of this as a traverse permission. A user must have execute access to the bin directory in order to execute or command.
  • 29. File Management in UNIX Starting a Process: • Foreground Processes: o By default, every process that you start runs in the foreground. It gets its input from the keyboard and sends its output to the screen. • Background Processes: o A background process runs without being connected to your keyboard. If the background process requires any keyboard input, it waits. o The advantage of running a process in the background is that you can run other commands; you do not have to wait until it completes to start another!
  • 30. File Management in UNIX Stopping Processes: • Ending a process can be done in several different ways. Often, from a console-based command, sending a CTRL + C keystroke (the default interrupt character) will exit the command. This works when process is running in foreground mode. • If a process is running in background mode then first you would need to get its Job ID using ps command and after that you can use kill command to kill the process.
  • 31. UNIX Security • Common Sense Security • File Permissions • Login daemons • Non-login daemons • Stack Smashing • Safe Scripts
  • 32. Benefits of UNIX Benefits in different ways % Flexibility 70% Freedom to choose IT from different vendors 67% Products from different vendors work together 66% Access across multi-vendor environments 65% Protect investment in existing computer systems 61% Ability to use/share information anywhere in the world 59% Cost savings 54% Interoperability/portability across various platforms 54% Organizational change not constrained by IT system 49% Cost of ownership 49%
  • 33. In Summary… • When the history of the information age is written, the extraordinary dynamics of the UNIX system marketplace will be seen as playing an important role. The UNIX system was developed at just the right time and place to be the critical enabler for a revolution in information technology. Client/server architectures, the Internet, object databases, heterogeneous transaction processing, and Web computing all emerged on the shoulders of the UNIX system.