Upload
milo-daniel
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
Operating System Traits
• An OS only works with one type of processor– X86 processors for us; Motorola for Mac– Must understand the CPU’s abilities
• How much memory it can use• What commands it understands and how to use
them
- You can write “High Level Code” and compile it for different processors
Traits, cont.
• OS starts running immediately after the POST test– Takes control of the computer from the POST
test– Continues running until computer is rebooted
or shut down– Can’t stop OS without stopping computer
Traits, cont.
• Application Programs can’t run without an OS– Word Processor, Spreadsheet, Web browser– Programmers write applications to run under a
specific OS– We can compile application(s) for different
OSs
Microsoft Word
Code base for Word – Page on Screen, Edit, etc.
Compiler for x86 Compiler for Mac
Application for Windows Application for Mac
Functions of an OS
• Must communicate with the hardware
• Must create a User Interface
• Must present available installed programs
• Allow user to add, move and delete installed programs
Communicate with Hardware
• Has to access hard disk drive, accept input from keyboard and output to monitor
• To do this, it works with the System BIOS• To run a program, we:
– Tell the OS what to run– OS then accesses the hard disk drive with appropriate
BIOS routines– OS then loads program into RAM
* Should provide error message(s) if hardware fails
Create a User Interface
• The Shoe Store analogy:– Shoes on display by gender, style, type– Shoes stored (in the back) by code number– Display(s) can be changed without affecting inventory
– for example a sale on dress shoes– What you see is the “User Interface” to the shoe
inventory
• The customers (users) look at display (the User Interface) and tell the salesperson (OS) what to do (programs and data)
Accessing and Supporting Programs
• Must enable user to start a program– Need a way to tell OS what program to run
• Type it in• Click with mouse
• OS must get out of the way of the program– Turn over control to program (DOS)– Fade to background (Windows)
• Must come back when program is done
Organizing Programs and Data
• To the computer, its all just a file– The OS is one, or more, file(s)– Programs are file(s)– Data is stored in file(s)
* Computer can only run three types of files:
- .COM files (compiled)
- .EXE files (also compiled)
- .BAT files (text files)
Naming Drives
• Use single letter only, followed by a colon
• A: and B: reserved for floppy drive(s)
• C: to Z: for hard disk, or other, drives
• Maximum of 26 drives at any one time
• Change drives (change focus) by typing drive letter (and colon) and press <Enter>
Naming Files
• 8.3 convention (DOS):– Up to eight characters for name– Up to three characters for file extension– Can’t use “special characters” – stick to letters
and numbers and no spaces• My File is not valid• MyFile01 is valid file name
- File names must be unique
Organizing Files
• Use directories and subdirectories; start with Root Directory (C:\)
Root DirectoryC:\
DataApps Stuff
FebJan
MyFile01MyFile01
Mar
Directories
• Directories can hold data or directories or both
• Directory names are eight characters (or less)
• Directory names do not have an extension (99.99% of the time – Word Perfect used extensions to baffle users)
Organizing Files
• Use directories and subdirectories; start with Root Directory (C:\)
Root DirectoryC:\
DataApps Stuff
FebJan
MyFile01MyFile01
MarThis is legal since fully qualified file name is:C:\Data\Jan\MyFile01
File name here is:C:\Data\Feb\MyFile01
User Interface
• Command line – DOS– You get to type command(s)– No mouse, but do get a cursor
• Graphical User Interface (GUI) – Windows– Uses icons to represent files– Point and click interface
Building DOS
• Three main files and two optional files– IO.SYS which is basic device drivers– MSDOS.SYS more drivers and where optional files
plug into the OS– COMMAND.COM which is the User Interface
• IO.SYS and MSDOS.SYS are hidden files; COMMAND.COM is visible file in directory listing
• Optional files are: CONFIG.SYS and AUTOEXEC.BAT – both are text files
Boot Sequence
• IO.SYS first
• MSDOS.SYS next– CONFIG.SYS for drivers and variables– AUTOEXEC.BAT for “automatic”
programming
* COMMAND.COM which provides the User Interface and command library
Internal and External
• Internal commands are:– Found within COMMAND.COM much like
chapters in the textbook– Can be run from any “location” on any drive
• External commands are:– Programs in their own file– Have to be available to DOS via directory or
path
What COMMAND.COM Does
• Convert command to upper case letters
• Search internally for command
• Search the current/active directory
• Search the directories specified in the Path environment variable
• Return to prompt with error message
A DOS Command
• <Action> [on what] [where]
• DIR, all by itself, will give you a directory listing of the current directory
• DIR A:\TEST\LIFE will give you a directory of the test\life directory on the A: drive
Minimum of one space
Internal Commands
• DIR for directory listing
• CD to change directory
• MD to make a directory under the current directory
• COPY to copy a file from one location to another (and, optionally, to change name of file)
External Commands
• FDISK to partition a hard disk drive
• FORMAT to format (prepare for data) a disk drive
• SYS to copy system boot files to the location specified
Path
• Lists drive locations, in order, to be searched for external commands
• C:\DOS; C:\WINDOWS; C:\WP51; C:\WINDOWS\SYSTEM32
• Can specify this in an entry in AUTOEXEC.BAT
Boot Disk
• Enough files (three for DOS) to load an operating system
• Windows requires too many files to fit on a boot disk
• Remember www.bootdisk.com – it might come in handy one day