Introduction To Operating Systems

Document Sample
Introduction To Operating Systems Powered By Docstoc
					   Introduction to
Operating System (OS)




                        1
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
            environment
           Backup, data recovery, disk optimization, virus protection,
            uninstaller
                                                                          2
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
    hardware



                                                                3
OS and the computer
                      User

                      Application programs

                      Operating system

                      Hardware




                                             4
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
                                                                 5
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
                                                                    6
  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
                                                               7
Hierarchical Directory structure




                            Directory Structure

                                     My Web


                           content             images   ...


                  banner   brings    careful    map




                                                              8
    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




                                                            9
Command line interface




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

                                            10
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”




                                                                  11
   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




                                                                            12
13
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



                                                         19
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




                                                               20
Multitasking
– 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
  (interactive)
– Background task – other running applications except the current
  application (non-interactive, low-priority)
                                                                    21
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?



                                                                   23
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


                                                 24

				
DOCUMENT INFO
Description: Introduction To Operating Systems, functions of operating system