Upload
erik-allison
View
222
Download
1
Embed Size (px)
Citation preview
Company Confidential
1
Computer System Organisation
Computer System Organisation
• Software
System S/W and Application S/W
• Hardware
Input Devices & Output Devices
System
SoftwareApplication
Software
Software
Computer System Organisation Software
Application software– Application programs may be
provided by the computer manufacturer or by the user
Computer System Organisation Software
Software System software
• Programs that support the execution and development of other programs
– Two major typesEg: Operating Systems
Translators(a) Assemblers
(b) Compilers
(c) Interpreters
• Utilities and Service Program
- Disk Fragmenter
- Virus Remover
Copyright © 2000 by Brooks/Cole Publishing Company
A division of International Thomson Publishing Inc.
Computer Software Relationships
UserInterface
Basic Input and Output Services (BIOS)• needed for a computer to boot up
User Interface Operating System
User Interface Application Programs
Computer Hardware
Software Application Software
• Application software makes computer popular and easy to use
• Common application software: Microsoft Word, WordPerfect PowerPoint Netscape, Internet Explorer PhotoShop, Photo-Paint Quick Time Dreamweaver
• Controls and manages the computing resources• Examples
– Windows, Unix, MSDOS,
• Important services that an operating system provides:– File system– Commands to manipulate the file system– Input and output on a variety of devices– Window management
Software System SoftwareOperating System
•
COMPUTER LANGUAGE
• Each computer has its own machine language, which is made of streams of 0s and 1s because the internal circuit of a computer is made of switches, transistors and other electronic devices that can only be in one of two states: off or on.
• 0 represents the off state; 1 represents the on state.
MACHINE LANGUAGE
Machine Language Program Using Binary System
00000000 00000100 00000000000000000101111000001100 11000010 0000000000000010
11101111 00010110 000000000000010111101111 10011110 0000000000001011
1111100010101101 11011111 000000000001001001100010 11011111 0000000000010101
1110111100000010 11111011 00000000000101111111010010101101 11011111 00000000000111100000001110100010 11011111 00000000001000011110111100000010 11111011 00000000001001000111111011110100 101011011111100010101110 11000101 00000000001010110000011010100010 11111011 00000000001100011110111100000010 11111011 0000000000110100
01010000 11010100 000000000011101100000100 0000000000111101
MACHINE LANGUAGE
Example of a machine language instruction:
ADD Value of Address tooperation 1st operand store result
00000101 00010000 00000000
• Symbols represent the machine language instructions.• A special program called assembler translates symbolic code into
machine language, thus it is also called assembly language. entry main, ^m<r2>
subl2 #12,spjsb C$MAIN_ARGSmovab $CHAR_STRING_CON
pushal –8(fp)pushal (r2)calls #2,readpushal –12(fp)
calls #2, readmull3 –8(fp), -12(fp), -pusha 6(r2)calls #2, printclrl r0ret
SYMBOLIC LANGUAGE
• Portable to many kinds of computers, allowing the programmer to concentrate on the problem at hand rather than the intricacies of the computer.
• Relieve the programmer from the details of the assembly language.• Share one thing with symbolic languages: they must be compiled to convert
to machine language.#include <iostream>
using namespace std;int main (void) { // Local Declarations int number1; int number2; int result;
// Statements cin >> number1; cin >> number2; result = number1 * number2; cout << result;
return 0; } // main
HIGH-LEVEL LANGUAGE
Translators
• Set of programs used to develop software• Types of Translators:
Compiler Interpreters Assemblers
• Examples– Microsoft Visual C++, Borland C++, g++
Software Development
• Major activities Editing (writing the program) Compiling (creates .obj file) Linking with compiled files
(creates .exe file)• Object files
• Library modules
Loading and executing Testing the program
Compile
Link
Library routines
Other object files
Think
Edit
Load
Execute
Source Program
Compilers
• A compiler translates the whole High Level Language prg into a Machine Code.
1. Produces obj. prg on disk
2. Produce a list of errors found during the compilation
• An alternative to using a compiler for HLL translation, use of interpreters is to translation of program line by line.
Interpreters
Our First Program
// a simple program#include <iostream>using namespace std;int main() { cout << "Hello world!" << endl; return 0;}
Printstatement
Ends executionof main() which ends
program
Comments
Function named main()
indicates start of
program
Quiz
1. A Source Program is the program written in____ Language
a. English
b. Symbolic
c. Computer
d. Machine
Quiz
2. A Program written in machine language is called_____ program
a. Assembler
b. Object
c. Computer
d. Machine
Quiz
3. Instructions for execution by a computer are given in ____ language
a. Symbolic
b. BASIC
c. Machine
d. Compiler
Quiz
4. An Assembler is a
a. Program
b. Person who assembles the devices
c. Symbol
Quiz
5. Which of the following are software
a. Transistor
b. FORTRAN
c. Compiler
Quiz
What is the difference between
Compiler & Interpreter
Input and Output Devices and SystemsInput and Output Devices and Systems
Hardware
Input, Storage, and Output Devices
Input= Enables data, or instructions, to be entered in to the computer.
Input device= Enables you to input data and commands into the computer.
Ex: keyboard, mouse, touch screen.
Output Device= enables the computer to give you the results of the processed data.
Ex: monitor, printer
Input Devices
Keyboard=Is the most commonly used input device for entering numeric and alphabetic data into a computer.
Special features:Ergonomic: A keyboard designed to provide, user with more natural,
comfortable hand, wrist, and arm position.Cordless: Mouse has no cord.Security= Some come with a biometric fingerprint reader, and magnetic
stripe and card reader.
Pointing Device
Pointing Device moves, around on a flat surface and controls the pointer on the screen.
Mouse= Most commonly used pointing device for personal computer.
Different Types Of Mouse1. Optomechanical= Uses a small orb underneath the
mouse.2. Optical= Uses laser to detect the mouse movement.3. Cordless= Does not use a cord relies on infrared or
radio waves.
Mouse
You use the mouse to accomplish the following techniques:• Pointing: Placing the pointer at designated location.• Clicking= Pressing and realizing the mouse button.• Dragging: Pressing down the mouse button and moving
the mouse while continuing to hold down the button.• Right-clicking= Pressing the right mouse button.
Other Input Device
• Touch display screen= allows you to input information on to the computer, by touching the screen, which also serves as output device. This device is commonly used in retail stores.
• Audio Input =Inputting voice by the use of special microphone.
• Voice recognition= device are used to “speak” – commands through the use of microphone.
Scanners
Scanners are device that can change image into electronic form that can be stored in a computer’s memory.
• Image scanners: Converts images to electronic form that can be stored and manipulated.
• Bar code scanners= reads bar line.• Magnetic Scanners: Reads encoded information on the
back of credit cards. The magnet code on back of the card contains encoded user’s account number.
Digital Camera and Video Input
Digital camera= are stored digitally and then can be transferred in to the computers memory. The images can be stored in a floppy disk, flash memory card, memory stick, and mini-disk.
Video input is the process of capturing full-motion images with a type of video camera and then saving the video on a storage medium such as a hard drive, CD, or DVD. After it is saved, you can view and edit.
Biometric Input
• Biometric is authentication technique using automated method of recognizing a person based on physiological or behavioral characteristic. Some of the more common identification techniques are finger print, face, handwriting, and voice, and looking at the retina found in the eye.
Different Types of Storage Device
• Floppy disk, is a flat circle of iron oxide-coated plastic enclosed in a hard plastic that measures about 3 ½ inches and has a capacity to hold 1.44MB, or more data. This device is know outdated.
• Hard Disk, are used to store data inside the computer, although some removal hard disk can be found externally from the computer.
Storage Device
Magnetic Storage Device
Magnetic storage device use oxide-coated plastic storage media called Mylar.A device called a an electromagnetic read/write head stores or retrieves data in circles called tracks. Tracks are numbered based on a file allocation system.
More Storages
• Optical Storage, device use laser technology to read and write data on a silver platters. The term disk is used for optical media. CDs and DVDs are a type of optical storage media.
• CD0DA• CD-R• CD-ROM• CD-RW• DVD-ROM• DVD-RW
Solid-State Storage Media
• Solid-state storage, is a nonvolatile removable medium in which everything is processed electronically, and thus contains no mechanical parts.
• A popular solid-state storage medium is the USB Flash drive.
I/O Systems
Time(workload) = Time(CPU) + Time(I/O) - Time(Overlap)
Disk Disk NetworkGraphics
I/OController
I/OController
I/OController
Processor
Cache
Memory - I/O Bus
MainMemory
interrupts
Storage System Issues
• Historical Context of Storage and I/O
• Secondary and Tertiary Storage Devices
• Storage I/O Performance Measures
• Queuing Theory
• Processor Interface Issues
• I/O Buses
• Redundant Arrays of Inexpensive Disks (RAID)
• File Systems
• I/O Benchmarks
• File System Performance
Historical Perspectives
1.5 MBytes Disk per person on the earth sold in 19920.1 MBytes Memory per person on the earth sold in 1992
Year
1988 1989 1990 1991 . . .
Disk, Terabytes
Memory, Terabytes
World Population, millions
0.01000.02000.03000.04000.05000.06000.07000.08000.09000.0
TBytes
0
5000
10000
15000
20000
25000
30000
MegaPeople
Alternative Data Storage Technologies
Cap BPI TPI BPIxTPI Data Xfer AccessTechnology (MB) (Million)(Kbyte/s) Time Time
Conventional Tape:Cartridge (.25") 150 12000 104 1.2 92 minutesIBM 3490 (.5") 800 22860 38 0.9 3000 seconds
Helical Scan Tape:Video (8mm) 4600 43200 1638 71 492 45 secsDAT (4mm) 1300 61000 1870 114 183 20 secsD-3 (1/2") 20,000 15 secs?
Magnetic & Optical Disk:Hard Disk (5.25") 1200 33528 1880 63 3000 18 msIBM 3390 (10.5") 3800 27940 2235 62 4250 20 msSony MO (5.25") 640 24130 18796 454 88 100 ms
Response time = Queue + Controller + Seek + Rot + Xfer
Service time
Devices: Magnetic Disks
• Purpose:
– Long-term, nonvolatile storage
– Large, inexpensive, slow level in the storage hierarchy
• Characteristics:
– Seek Time (~20 ms avg, 1M cyc at 50MHz)
• positional latency
• rotational latency
• Transfer rate
– About a sector per ms (1-10 MB/s)
– Blocks
• Capacity
– Gigabytes
– Quadruples every 3 years (aerodynamics)
3600 RPM = 60 RPS => 16 ms / revolution avg rot. latency = 8 ms32 sectors / track => 0.5 ms / sector1 KB / sector => 2 MB / s 32 KB / track20 tracks / cylinder => 640 KB / cylinder2000 cyl => 1.2 GB
PlatterHead
Track
Cylinder
Sector
Disk Device Terminology
Disk Latency = Queuing Time + Seek Time + Rotation Time + Xfer Time
Order of magnitude times for 4K byte transfers:
Seek: 15 ms or lessRotate: 8.3 ms @ 3600 rpm (4.2 ms @ 7200 rpm)Xfer: 2 ms @ 3600 rpm (1 ms @ 7200 rpm)
Tape vs. Disk
• Longitudinal tape uses same technology as hard disk; more tracks for density improvements
• Inherent cost-performance difference based on geometry: fixed rotating platters with gaps (random access, limited area, 1 media / reader)
vs. removable long strips wound on spool (sequential access, "unlimited" length, multiple / reader)
• New technology trend: – Helical Scan (VCR, Camcoder, DAT) – Spins head at angle to tape to improve density
Optical Disk vs. Tape
Type 5.25" 8mm Capacity 0.75 GB 5 GB Media Cost $90 - $175 $8 Drive Cost $3,000 $3,000 Access Write Once Read/Write Robot Time 10 - 20 s 10 - 20 s Media cost ratio(cost/capacity)
optical disk vs. helical tape = 75 : 1 to 150 : 1
Optical Helical Scan Disk Tape
Current Drawbacks To Tape
• Tape wears out:– Helical 100s of passes to 1000s for longitudinal
• Head wears out: – 2000 hours for helical
• Both must be accounted for in economic / reliability model
• Long rewind, eject, load, spin-up times in helical tapes;
not inherent, just no need in marketplace (so far)