Introduction To Operating Systems by Nouman1203


More Info
									   Introduction to
Operating System (OS)

System software
   Components of system software
     – Operating system
        Controls application software

        Manage hardware devices and allocate resource

        Provide user interface

        Not optional

    – Utility software
           Programs to support and enhance the existing computer
           Backup, data recovery, disk optimization, virus protection,
Operating system (OS)

   (A collection of) programs reside in the main memory
   Provides the tools / interface to enable user to interact
    with the computer
   Manages the basic operations of the computer
   Coordinates hardware components
   With OS, programming task is much simplified.
    We can focus on running applications, writing programs,
    without bothering the issues of managing computer

OS and the computer

                      Application programs

                      Operating system


OS for different computers

   Different computers have their own OS
   Examples of OS:
     – For PC: DOS, OS/2, Win 98/NT/XP/Vista/Windows-7,
       Mac OS
     – For pocket PDA: Windows CE, Palm OS
     – For minicomputers: VAX/VMS and many more
     – For mainframes: MVS and VM and many more
     – Other OSs – Unix, Linux, Sun Solaris
   An OS written for one kind of computer will not be able to
    run on another machine
Functions of an OS – File Management
1.   Managing files
  –OS keeps track of different disk drives and provides
  an uniform access interface
  (e.g. HDD=C:, Floppy=A:, despite their difference in structure)
  –OS provides the concept of “File” and supports related
  operations such as locate/copy/move/delete/rename
* When you write data to disk, you
have to specify the Face number, the
Track number and the Sector number

OS do the translation work for you. So
when you save a document, you don’t
have to consider Face/Track/Sec
  Functions of an OS – File Management
     Apart from physical file location, OS also keep tracks
      of the file attributes: Hidden / Read-Only / System
     Some OS has more advanced attribute setting, e.g.
      Allows reading but do not allow execution…etc.

     OS also supports the concept of directory / folder and
      provides relevant operations such as copy, rename,
      delete, move…etc

     Files can be organized for easy access using folders
       C:\My Documents\CS2172\chapter1.doc

Device letter     Folder    Subfolder Filename Extension
Hierarchical Directory structure

                            Directory Structure

                                     My Web

                           content             images   ...

                  banner   brings    careful    map

    Functions of an OS

   2. Managing storage media
     – Format a disk to get it ready to store data
     – Scan a disk to check for errors
     – Defragmentation

   3. Provides a user interface to communicate with user
     Command line interface (CLI) – eg. Unix
     Graphical user interface (GUI) – eg. Windows

Command line interface

 • No Icon
 • Usually no support for pointing device
 • Users have to remember commands

Example: Basic MS DOS Commands

List   the files in current directory / folder:
                                        Show in wide list form:
   Show all files:                            “DIR /W”
 “DIR” or “DIR *.*”
 (* is called wildcard)

                                         Show only PDF files:
                                            “DIR *.pdf”

   Graphical user interface (GUI)

    Designed by Xerox Corporation's in the 1970s
    Became popular since 1980s (used in Apple Macintosh later
                                            followed by Windows)

Graphical character-based user interfaces   Real Graphical user interface

Functions of an OS
   4. Provides protection
     – Uses password to ensure information safety
    – Some OS allows different groups of users to have
      access right of files
        e.g. Students: allows “Read” only

             Teacher: allows “Read” and “Write”
    – For network-connected environment, OS can limit
      the sharing of directories/folders by means of
      password or user class

Functions of an OS
   5. Process Management
     – CPU is a very fast device (e.g. 2.4GHz).
     – I/O operation (read disk, read keystroke, transmit
       through modem…etc) is relatively slow
     – Utilization of CPU (expensive) is low => Waste
     – Solution:
          Load more than one task into memory

          When a task waits for I/O, switch to another task

          High Utilization

          Better response time

– Allows more than one task to run concurrently in computer
      Typing in Word, reading email, listening to CD, printing
– OS divide a second into small slices (called quantum)
– OS allow a task to run for the time period of 1 quantum
– Upon timeout, the CPU will be used to serve another task
– OS manages the “Priority” of tasks and assign different
  amounts of time to each program.
– Foreground task – the current application you are working in
– Background task – other running applications except the current
  application (non-interactive, low-priority)
Functions of an OS

   6. Memory management
    – OS keeps track of the use of computer memory
    – Partition main memory (RAM) into separate areas
      for holding different data or programs
    – Memory area of each process should be protected
      from each other
    – Manage virtual memory especially when physical
      memory is not enough
          Which process / block of memory should be swapped out
           and written on Harddisk?

Functions of an OS

   7. Managing hardware & system resources
   Device driver
    – A program for a special hardware device
      (eg. printer, scanner, joystick)
    – Allows communication between OS and the
      hardware device
          Activation of hardware
          Input data from hardware
          Output data to hardware
    – Enable the use of new (type of) hardware


To top