Unix Overview - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Unix Overview

Description:

The shell's prompt is usually visible at the cursor's position on your screen. ... Command files, called 'shell scripts' are used to accomplish a series of tasks ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 23
Provided by: mer95
Category:
Tags: overview | unix

less

Transcript and Presenter's Notes

Title: Unix Overview


1
Unix Overview
  • CSCI 2467 System Programming Concepts
  • Computer Science Department
  • University of New Orleans
  • Instructor Michael Ruth
  • mruth_at_cs.uno.edu

2
Topics
  • Unix Philosophy
  • Basics
  • Key Features
  • Multi-tasking
  • Multi-users
  • Networking built-in
  • Internal Boundaries
  • File Processing
  • Memory Management
  • Unix Structure
  • Kernel
  • Shell
  • Utilities
  • Groups of utilities

3
The Philosophy of Unix
  • Make each program do one thing well.
  • To do a new job, build afresh rather than
    complicate old programs by adding new features.
    (KISS Concept)
  • Expect the output of every program to become the
    input to another, as yet unknown, program. (Pipe
    Concept)
  • Don't clutter output with extraneous information.
  • Avoid stringently columnar or binary input
    formats. (Textual Concept)
  • Don't insist on interactive input.
  • Design and build software, even operating
    systems, to be tried early, ideally within weeks.
    (prototyping concept)
  • Don't hesitate to throw away the clumsy parts and
    rebuild them.
  • Use tools in preference to unskilled help to
    lighten a programming task, even if you have to
    detour to build the tools and expect to throw
    some of them out after you've finished using
    them.(Lazy Concept)

4
Key Features of Unix
  • Multi-tasking
  • Multi-users
  • Networking Capabilities
  • File Processing
  • Virtual memory
  • Other Features

5
Multi-tasking
  • The ability of the operating system to perform
    more than one task at a time
  • Essential for
  • Real-time performance
  • Multi-User Systems
  • Asynchronous systems
  • Additionally, these tasks can communicate if
    necessary

6
Multi-Users
  • The ability of the Unix operating system to allow
    more than one user at a time
  • The handling of multiple users is also very
    important
  • Notion of sharing
  • Notion of guarded access
  • Preventing Interference

7
Accessing the Network
  • Unix was built to communicate
  • With other computers (via a host of network
    protocols)
  • BSD Unix created the notion of the Sockets API
  • Which is still in use today
  • Inter-process Communication
  • Tasks are able to communicate freely
  • Notion of piping

8
File Processing
  • Everything is a file
  • Allows for every I/O subsystem to be handled
    uniformly
  • Mouse, printer, text file, etc
  • Unix files have neither record structure nor
    attributes
  • Everything can and should be treated as ASCII
  • The file system is hierarchal

9
Virtual memory
  • The UNIX operating system has virtual memory, or
    swap space.
  • Vital for
  • Applications that use very large amounts of data
  • Systems which handle multiple users/tasks in
    parallel
  • Paging, Swapping, Thrashing

10
Other Features
  • Portability
  • Unix is very portable (thanks to C)
  • Flexibility
  • Unix is very customizable
  • Available Software
  • Tons of freely available software available right
    now
  • Case Sensitivity
  • Almost everything in Unix is CaSe-SeNsItIvE!

11
Unix Structure
  • Unix is composed of layers
  • These layers exist between the user and the
    hardware
  • And consists of three major components
  • Kernel
  • Shell
  • Utilities

12
Unix Kernel
  • The core of the Unix OS
  • Performs all low-level operations which create
    the Unix environment on a particular system
  • Kernel interacts directly with the hardware
  • The part of the kernel which deal with I/O
    directly (AKA drivers) must be adapted to each
    new system
  • Porting a UNIX system is the process of adapting
    the hardware dependent parts of the kernel
  • You do not need to know anything about the kernel
    in order to use a UNIX system (and shouldnt)

13
Kernel Function Types
  • Kernel functions are of two broad types
  • Autonomous those functions which are performed
    without being explicitly requested by user
    processes
  • Responsive those functions which are initiated
    by requests from processes.

14
Functions of the Kernel
  • File Management and Security
  • I/O Services
  • Date and Time Services
  • Interrupt and Error Handling
  • System Accounting
  • Memory Management
  • Process Scheduling Management

15
Unix System Calls
  • Requests from processes come in the form of
    system calls.
  • A system call can be thought of as a low level
    request to the operating system
  • The Unix Kernel supports over 60 system calls
    which taken together form the Unix API
  • This is one of the reasons Unix is so very
    portable

16
Shell
  • Whenever you login to a Unix system you are
    placed in a shell program.
  • The shell's prompt is usually visible at the
    cursor's position on your screen.
  • To get your work done, you enter commands at this
    prompt.
  • The shell is a command interpreter it takes each
    command and passes it to the operating system
    kernel to be acted upon.
  • It then displays the results of this operation on
    your screen.

17
Shell Types
  • Several shells are usually available on any UNIX
    system, each with its own strengths and
    weaknesses.
  • Different users may use different shells.
  • Initially, your system adminstrator will supply a
    default shell, which can be overridden or changed
  • The most commonly used shells are
  • Bourne shell (sh)
  • C shell (csh)
  • Korn shell (ksh)
  • TC Shell (tcsh)
  • Bourne Again Shell (bash)

18
Shell Programming
  • Each shell also includes its own programming
    language.
  • Command files, called "shell scripts" are used to
    accomplish a series of tasks
  • Additionally there are scripting languages that
    perform the same thing
  • Perl
  • Python
  • Sed
  • Awk
  • Tcl
  • Scheme

19
Utilities
  • UNIX provides several hundred utility programs,
    often referred to as commands.
  • Accomplish universal functions
  • editing
  • file maintenance
  • printing
  • sorting
  • programming support
  • online info
  • Modular single functions can be grouped to
    perform more complex tasks

20
References
  • Unix Overview (USAIL Unix System Administration
    Independent Learning)
  • http//www.uwsg.iu.edu/usail/index/concepts.html
  • The Art of Unix Programming (online book E.
    Raymond)
  • http//www.faqs.org/docs/artu/
  • Intro to Unix/Linux (Canada National Research
    Council)
  • http//rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/document
    s/basic/basic.html
  • Intro to Unix (Maui High Performance Computing
    Center)
  • http//www.mhpcc.edu/training/vitecbids/UnixIntro/
    UnixIntro.htmlOverview
  • Overview of Unix OS (Bell Labs)
  • http//www.bell-labs.com/history/unix/tutorial.htm
    l
  • Understanding Unix A Conceptual Guide
  • ISDN978-0880223430
  • Library book (very very old -gt Do NOT buy this
    book!!!)

21
Future Classes
  • Unix File System
  • Unix Permission System
  • Text/File Processing
  • Processes and Job Control
  • Shell Programming Regular Expressions
  • Other important Unix Commands

22
Questions?
Write a Comment
User Comments (0)
About PowerShow.com