1.78k likes | 1.95k Vues
Part 1 Major Concepts. Hardware inside the PC 5 Elements of a computer POST Disk boot Interrupts Plug and Play. Hardware Inside the PC. Power Supply Case Removable Drive CD-ROM Drive Tape Drive Hard Drive Floppy Drive. Hardware Inside the PC. IDE Controllers AGP Expansion Slot
E N D
Part 1Major Concepts • Hardware inside the PC • 5 Elements of a computer • POST • Disk boot • Interrupts • Plug and Play
Hardware Inside the PC • Power Supply • Case • Removable Drive • CD-ROM Drive • Tape Drive • Hard Drive • Floppy Drive
Hardware Inside the PC • IDE Controllers • AGP Expansion Slot • PCI Expansion Slot • Video Card • Sound Card • RAM • Real-Time Clock
Hardware Inside the PC • CMOS [Complementary Metal-Oxide Semiconductor] • BIOS [Basic Input-Output System • CMOS Battery • Microprocessor • Heat Sink • Fan
Hardware Inside the PC • USB ports • Mouse Port • Keyboard • Parallel Port • Serial Ports • Sound Card Connections • Modem
5 Elements of a Computer • Input • Output • Memory • CPU • Storage
Input/Output • Sound Card • Speaker output • Microphone & line inputs • Modem (MOdulator/DEModulator) • Ports (USB, Parallel, Serial, SCSI)
Input • Keyboard • Mouse/Trackball/Touchpad/Wireless/programmable/pointing/optical • Originated by Xerox Palo Alto • Touch screens
Output • Video Card (AGP) • Powerful computer in its own right • Display (monitor) • Resolution • Refresh Rate • Bandwidth
Electronic Memory • L1 Cache (on microprocessor chip) • L2 Cache (on motherboard) • RAM (on motherboard or daughter board)
CPU: Control and ALU • Microprocessor • Real-time clock • BIOS • CMOS • IDE Controller • SCSI Controller • USB Controller
Power-On Self-Test • Boot (Boot Strapping) • Steps computer takes to get from your pushing “on” button to when the computer is operational • First Step: Power On Self Test (POST) • Purpose: Computer tests itself to ensure that basic processing unit and connected devices are alive and well • Test Result • Pass: single short beep • Failure: different combinations of beeping (including no beep at all), displays messages, if possible
How Does POST work? • When Power Is Turned On, Electrical Signal Is Sent to CPU Signaling It to Reset • Clears old data, initializes counters (registers) • Sets program counter to pre-defined address in memory (F000) • Memory location referenced is in Read Only Memory (ROM) of PC’s Basic Input/Output System (BIOS) • ROM stays the same, even when we turn off the power • Instructions define steps CPU should perform to complete self test
Self Test Steps • CPU Checks Itself (e.g., adds some numbers, checks results) • Sends Electrical Signals Over Bus to See If All Components Connected to Bus Are Functioning • Check System Timer (Real-time Clock) • Check Out memory on Video Card • Locate card, execute video card POST • If passes, link video card to CPU’s BIOS • If all goes well, display text/graphics
Self Test • Check Out RAM (volatile memory) • Write data to each chip • Read stored data: is it what was written? • Detect how much memory is available
Self Test • Establish What Disk Drives Are Available • Verify Keyboard, Have Any Keys Been Pressed? • Now That Post Is Complete… • Components are functioning properly • Have located disk drives
Self Test • Check Out Remaining Components • See if component contains own BIOS code • If so, execute startup code, link to BIOS • See if component supports Plug and Play • execute Plug and Play instructions to distribute system resources • Compare Component Inventory With “Saved” List • Stored in “CMOS” chip • If different given choice: is this new list correct?
Disk Boot • Task • Objective: load operating system, which includes software to access disks into memory • Problem: how do I load from a disk the software that tells me how to use a disk if I don’t know how to access the disk in the first place? • Key players • BIOS (in EPROM) (will link to operating system) • CPU (brains) • Disk drive, contains disk operating software • RAM (final resting place for software)
Disk Boot 1 • BIOS checks floppy disk drive. If present, checks predefined location on floppy for disk operating system files (IO.SYS and MSDOS.SYS) • If not present in floppy, checks hard drive • If not present on hard drive, generate error message • Order of reading devices can be changed in BIOS setup
Disk Boot 2 • Boot program reads first sector of disk (cylinder 0, head 0, sector 1) (512 bytes): Master Boot Record (MBR) • MBR is a miniprogram that locates bootable partition of the disk • BIOS transfers control to MBR • MBR locates DOS boot record (DBR), also a mini-program
Disk Boot 3 • DBR attempts to load “hidden” file IO.sys into RAM • If OK, DBR transfers control to SYSINIT, a program within IO.sys • At this time boot record is no longer needed and can be erased from RAM.
Disk Boot 4 • SYSINIT loads MSDOS.sys into RAM • File management • How to execute programs • Interact with hardware • SYSINIT locates CONFIG.SYS (at root directory) • User defined • Let’s user tailor operating system • Loads certain device drivers
Interrupt Handling • When an “Event” Occurs, a Hardware Signal Is First Sent to the Interrupt Controller Chip That Detects and Interprets the Interrupt • Interrupt Controller Chip Notifies CPU That Interrupt Has Occurred • Since the CPU Was Doing Other Things, the Processor Saves Its Current State So That It Can Resume That Task Later (Pushes Data Onto the Stack)
What is Plug and Play? 1 • So what’s the problem? • Each PC Contains a Number of Components That Need to Work Together • Each Component May Need to Have Its Own: • Interrupt ID • RAM that only it writes to (DMA) • Input/Output address (e.g., floppy drive vs. hard drive) • ROM address (where its own BIOS will go) • RAM buffer address (how data is passed to/from this component)
What is P&P? 2 • This Cooperation Depends on the Exact Configuration of Components • Each Time a Component Is Added or Taken Away, the Configuration Must Be Changed • Plug and Play Is a Standard Which Allows Your Computer to Perform This Task “Automatically”, Letting You Use You New Components Without Time or Error Potential of Performing Your Own Installation
How Does Plug and Play Work? 1 • Plug and Play Compatible BIOS Locates All Potential Components (Plug and Play Compatible) • Each component contains a unique identifier as part of its Read Only Memory (non-volatile memory) • Each component defines what resources it needs and what range of resources it will accept • BIOS transfers control to operating system
How Does P&P Work? 2 • Windows Configuration Manager Creates Enumerators (Interface Programs Between Operating System and Devices Themselves) Based Upon Located Interfaces • ISA enumerator • SCSI enumerator • Port enumerator
How Does P&P Work? 3 • Enumerators Consolidate Information for All Components Using a Given Interface and Provide This to the Configuration Manager • Configuration Manager Assigns Actual Resources (e.g., Interrupt IDs), Avoiding Conflicts. Each Component Stores These Assignments Within Its Own Hardware So That It Knows How It Will Be Used • OS Locates Driver for All Components: If Not Found, Asks User to Install It
Part 2Major Concepts • How programming languages work, different programming languages • Windows multi-tasking • Manipulators of data • Bitmapped graphics, compression, vector graphics • Resolution • Computer security definitions • Viruses, anti-virus software
How Programming Languages Work • Software is created using different computer programming languages that provide instructions for telling computers what to do • Unlike the English language, which is less than precise, computer language is more exacting and limited • Different programming languages for different types of computers and tasks • Usually described as low-level or high level
Different Programming Languages • Low-level versus high-level languages • The more a computer language represents English, the higher its level • Low-level- ‘machine’ language – a series of codes represented by 1s and 0s • Communicate directly with the PCs processor • Assembly Language • Slightly higher than low-level language, uses simple command words to supply step-by-step instructions for the CPU to carry out
Different Programming Languages - 2 • High-level languages allow programmers to write in words and terms that more closley parallel english • Java • C, C++ • XML • Highest level languages • BASIC – [Beginners All-Purppose Symbolic Instruction Code] • Visual Basic key many key words and phrases that execute specific commands within the program when it is compiled [run]
Multitasking Under OS Control • Running several application programs at the same time • Doing a web search while typing in your homework on your word processor • What problems does this create? • Only 1 CPU (processor) • Memory • Use must be coordinated • May run out of RAM in MS Windows
Windows Multitasking (Memory) • Each application is assigned a block of RAM for its exclusive use • As allocated RAM fills up, OS swaps out unused “pages” of RAM to virtual memory on disk • If swapped-out pages are needed later, they must be swapped back into RAM, from slower virtual memory
Windows Multitasking (CPU) • Each program is given a very short slice of time • Not interrupt driven • When time is up • CPU internal registers used by the application are saved • CPU internal registers used by the other application are restored
Windows Multitasking (Peripherals) • If application program wants to use a peripheral, it queries the OS • If free, OS connects application to peripheral (e.g., prints document) • If not free, OS rejects request, or, e.g., queues file to print and prints when free
Manipulators of Data (1) • Database managers • Address list • Digital juke boxes • Word processing • Including desktop publishing • html editors
Manipulators of Data (2) • Number crunchers • Spreadsheets • Financial packages • Graphics • Drafting programs (CAD) • Paint programs • Photo editing
Manipulators of Data (3) • Multimedia • Combines pictures, music, spoken words • Communications software • E-commerce, broadcasting, email • Encryption • Utilities • Virus checkers • Compression
Bitmapped Graphics Files • File starts with information • Which bitmapped graphics format it is in • .BMP, .PCX, .TIF, .JPG • “Magic” number • The height and width of the picture in pixels • The palette • Number and range of colors which can be used in the image
Bitmapped Graphics 9 Pixels 9pixels • Bitmapped Graphics • A format in which each pixel is individually described • Binary • Black/white • Color • Red/Green/Blue (RGB) various resolutions
Bitmapped Graphics: Color • Instead of black and white, each pixel can be a different color • Accuracy of color depends on how many different colors we can represent • Select from predefined palette of colors (2, 64, or 256) • Specify the amount of red, blue, and green in each pixel • Permits 16,777,216 million colors (256 * 256 * 256) • Describing each pixel takes 24 bits (vs. 8 for 256 colors)
Compression • Describing all these pixels in so many colors can take up a lot of space • More file space • More RAM to display • More time to see web page • More time to ftp data over communications link
Compression (1) • To reduce storage requirements, use data compression techniques • Lossless • Reduce data quantity without loss of information • Scientific uses, e.g., space imagery from Mars • Lossy • Reduce data quantity, but loss of quality • JPEG, reduce quantity with minimal loss of quality
Compression (2) • Detect presence of patterns within data • Observation: consecutive pixels are often same color • Use run-length encoding (RLE) • Check first bit of key byte • if 1, next 7 bits define how many subsequent bytes will describe individual pixels • if 0, next 7 bits define how many subsequent bytes will have the identical color value • RLE great when consecutive pixels are same, can actually require more storage if all pixels are different
Displaying Bitmapped Graphics • Video Graphics Adapter Card • Stores image in video memory • Controls position of beam on screen • Uses digital to analog (D/A) converter chip to convert digital representation of hue, saturation, and intensity (HSI) into electrical signal fed to monitor to write each pixel • Screen consists of red, green, and blue phosphors which “phosphoresce” at varying intensities to create color.
Vector or Bitmapped Graphics • Vector graphics • Line is an object represented as formula containing start/stop point, width, line and fill colors, hierarchy • Easily rotated, stretched, flipped, resized and deleted • To display object on monitor, program creates a temporary bitmapped image using the resolution defined for this display device
Vector or Bitmapped Graphics • Consider drawing a red line via graphics creation software • Paint (bit mapped graphics) • Fixed number of pixels form the entire line • Not easily enlarged or reduced Creating graceful curves is easy with Draw programs: can control exactly the location and degree of curvature
Resolution • We can also control how many pixels we use to represent the picture Gray Scale7,000 LineArt1,000 150 DPI Color88,000 72 DPIColor21,000
Computer Security Definitions: NSA • Virus • A program that can “infect” other programs by modifying them to include a possibly evolved, copy of itself. • Trojan Horse • An apparently useful and innocent program containing additional hidden code which allows the unauthorized collection, exploitation, falsification, or destruction of data