Download Operating Systems Overview - Lecture Slides | LIS 451 and more Study notes School management&administration in PDF only on Docsity!
Grad School of Lib & Info Sci., Univ. of Illinois
http://www.lis.uiuc.edu/
Operating Systems Overview
LIS 451 * Fall 2005
Introduction to Networked Systems
http://www.isrl.uiuc.edu/˜mwolske/lis451/fall
Martin Wolske
[email protected]
Writing Good Programs
- A key concept in writing large programs is modularization.
- Generalized functions of the program are written as separate pieces of code for easier use and maintenance.
- E.g., Printed volume of the Encyclopedia Brittanica
- To lookup info about airplanes, need to only pick up the ‘A’ volume.
- For publisher to correct an error about airplanes, need to only modify the ‘A’ section
Operating System Diagrammed
Issues in choosing an OS
- Usability is determined primarily by:
- User interface
- Available applications
- Support available
- Stability and performance are determined primarily by:
- Kernel
- Supporting applications
- User interface
User Interfaces
Pros of Command-driven User Interface
- More flexible
- command line switches + pipes + redirects ∗ switch = /s or -h, as in ‘format /s c:’ ∗ pipe = |, as in ‘dir | more’ ∗ redirect = >, as in ‘ls > out.txt’
- can batch them together ∗ e.g., tar -cf -. | ‘(cd /newdir && tar -xf -)’
- More stable
- Runs using less hardware resources
- Easier to run remotely
User Interfaces
Cons of Command-driven User Interface
- More difficult to learn and remember
- More room for error (oops, what I meant to type was:
- rm -r etc ∗ (that is, folder in current subdirectory)
- not
- rm -rf /etc ∗ (that is, configuration files for whole system)
User Interfaces
Cons of Menu-driven/GUI User Interface
- Less flexible – works best when you work within parameters set by programmer
- Less stable – crash in GUI crashes applications
- Needs more hardware
- More difficult to run remotely
Supporting Applications
- Operating Systems vary widely in the types of supporting applications provided for the user.
- Supporting applications make it easier for users to manage files, setup and use printers, manage system resources, and even do basic activities like creating text files or doing math.
- As the number of supporting applications have grown, the number of install disks has also grown
- This week during lab, installations of the OS will require selection of the types of supporting applications to be included as packages, and as individual compo- nents.
The Kernel
- As already pointed out, the kernel manages the resources of the computer.
- Processes
- Memory
- File I/O
- Device I/O
The Kernel
Processes
- How processes can use CPU’s time
- single-tasking
- multitasking ∗ cooperative multitasking - programs are told they have so much time to do as much as they can before they need to give the CPU back. Rogue programs can lock up the whole computer (remember old Windows 3. apps? Also Mac Pre-OS X). ∗ preemptive multitasking - programs submit small segments of code (threads) which are processed in their entirety. Further, the kernel can interrupt pro- cessing of threads. More reliable way to share resources and the one most typically used in modern OS’s. All new OS’s use preemptive multitasking.
The Kernel
Device input and output
- Kernel of OS controls the interactions of device with computer’s I/O subsystem and CPU
- Device drivers translate 0’s and 1’s that a device speaks into something the OS can understand. As such, it must be specific to the controller AND the OS.
- Device drivers can either be part of kernel or a supporting application
- Finding the right device drivers can often be a major hurdle in getting a device to work in a system. Device drivers are not always available for a given con- troller and specific Operating Systems. Therefore, many OS support pages have hardware compatibility lists.
The Kernel
File Input and Output
- Kernel of OS controls the reading and writing of files to storage media
- File Systems - the logical structure and software routines used by the OS to control file I/O - Logical Structure - partitioning and formatting of drive. - Software routines - used to manage and enhance logical structure
Using a Tree to Create a Logical Structure
Standard *nix Tree Directories
/ root partition. Top level directory from which all other directories arise. Anything not put in a different partition is stored here. /etc configuration files /var variable or misc stuff, including /var/logs, /var/spool /bin OS specific utilites /sbin OS specific utilities for super users /usr user files, including /usr/bin, /usr/sbin, /usr/local/bin /home home directories
Using a Tree to Create a Logical Structure
Advantages of the Tree Structure
- if space fills up for a specific usage (e.g., home directories) a new disk can be added and a new partition created, with it mounted at the appropriate point (/home)
- If a specific user needs more space, they can get their own partition mounted at their directory mount point (e.g., /home/mwolske) without any change to any shortcut.