1 / 31

How Hardware and Software Work Together

How Hardware and Software Work Together. Chapter 2. Chapter Objectives. How an operating system manages hardware. How system resources help hardware and software communicate. The steps involved in booting your computer. How an OS Manages Hardware.

hera
Download Presentation

How Hardware and Software Work Together

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How Hardware and Software Work Together Chapter 2

  2. Chapter Objectives • How an operating system manages hardware. • How system resources help hardware and software communicate. • The steps involved in booting your computer.

  3. How an OS Manages Hardware • Operating System – software that controls the computer. • Manages hardware • Runs applications • Provides an interface for users • Stores, retrieves and manipulates files • The OS is the middle man between software and hardware.

  4. How an OS Manages Hardware • Most common OS today are Windows XP, Windows 2000, and Windows 98/ME. • Mac OS and Linux are two OS not made by Microsoft. • Since the OS does relate directly to hardware, it needs drivers or BIOS to interface with the hardware. • Figure 2-2 pg. 41

  5. How an OS Manages Hardware • Most PC software falls into 3 categories. • Device drivers or the BIOS • Operating System • Application software

  6. How an OS Manages Hardware • Device drivers – small programs stored on the hard drive that tell the computer how to communicate with a specific hardware device. • Problem: see if you can locate the drivers for an HP 955c Deskjet printer (go to www.hp.com) • Basic input/output is hard coded directly on the BIOS chip.

  7. How an OS Manages Hardware • ROM BIOS programs fall into 3 categories: • Programs to control I/O devices, called system BIOS. • Programs to control the startup of a computer, called startup BIOS. • Programs to change the setup information stored in CMOS, called CMOS setup,

  8. How an OS Uses Device Drivers • Used to interface with specific hardware. • Stored on the hard drive. • Some device drivers are installed when the OS is first installed or when new hardware is added to a system. • Hardware such as printers, scanners, and digital cameras need device drivers in order to work. • Usually these drivers are installed before the component is connected.

  9. How an OS Uses Device Drivers • Before installing a new hardware device on Windows 2000/XP systems, always check the hardware compatibility list (HCL) to determine if the driver will work under that OS. • http://www.microsoft.com/whdc/hcl/default.mspx

  10. How an OS Uses System BIOS to Manage Devices • The OS communicates with simple devices, such as Floppy drives or keyboards through system BIOS. • System BIOS are also used to access the computers hard drive. • If the OS has the choice, it will choose to use device drivers instead of system BIOS.

  11. How an OS Uses System BIOS to Manage Devices • Recall, system BIOS are stored in ROM. • Because RAM is accessed faster than ROM, system BIOS might be copied into RAM. • Called Shadow ROM or Shadow RAM.

  12. System Resources • System Resource – a tool used by either hardware or software to communicate with the other. • When BIOS or a driver wants to send data to a device, or when the device needs attention, the device or software uses system resources to communicate.

  13. System Resources • 4 types of system resources: • Memory addresses • I/O addresses • IRQ (Interrupt request numbers) • Direct memory address (DMA) channels. • Table 2-1 pg. 46

  14. System Resources

  15. System Resources • Hardware devices signal the CPU for attention by using IRQ. • Software addresses a device by using one of its I/O addresses. • Software looks at memory as a hardware device and addresses it with memory addresses. • DMA channels pass data back and forth between a hardware device and memory.

  16. System Resources • Figure 2-7 • All four system resources depend on certain lines on a bus on the motherboard. • A bus system has 3 components: • Data bus carries the data • Address bus communicates addresses (both memory address and I/O addresses) • Control bus controls communication (IRQ’s and DMA channels)

  17. IRQ • When the keyboard needs the CPU to process a keystroke after a key has been pressed, the device needs a way to get the CPU’s attention, and the CPU must know what to do once its attention is turned to the device.

  18. IRQ • These interruptions to the CPU are called Hardware Interrupts. • The device initiates an interrupt by placing voltage on the designated IRQ line assigned to it. • This voltage on the line serves as a signal to the CPU. • Table 2-2 pg. 47 - 48

  19. IRQ • On motherboards, part of the chip set called the interrupt controller manage the IRQs for the CPU. • If more than 1 IRQ is up at the same time, the IRQ with the lower value will be processed first. • Figure 2-8 pg. 49 • Figure 2-9 pg. 50 • Figure 2-10 pg. 51

  20. IRQ • Polling – software that is constantly running has the CPU periodically check the hardware device to see if it needs service.

  21. Memory Addresses • An OS relates to memory as a long list of cells that it can use to hold data and instructions. • Similar to a one dimensional spreadsheet. • Each cell, memory location, is assigned a number beginning with 0. • These numbers are assigned when the OS is loaded and are called Memory Addresses.

  22. Memory Addresses • Figure 2-11 pg. 52 • Think of memory addresses as a seat number in a theater. • Each seat is assigned a number regardless of whether someone is sitting in the seat. • The person sitting in the seat can be the data. • The OS does not refer to the person by name, but only by seat number.

  23. Input/Output Address • I/O addresses, or port addresses, are numbers the CPU can addresses to access physical memory. • Figure 2-12 pg. 53 • Basically, the CPU knows the hardware device as a group of I/O addresses.

  24. DMA Channels • DMA – Direct memory access • Shortcut method that lets an I/O device to send data directly to memory bypassing the CPU. • Chip on the motherboard that contains the instructions and logic of DMA. • Figure 2-13 pg. 54

  25. OS Tools to Examine a System • Device Manager • Allows you to manage hardware devices. • System Information Utility • Gives information similar to that given by the Device Manager. • Microsoft Diagnostic Utility • Used to view information about the system, including information about memory, video, ports, device drivers, and system resources.

  26. Booting Up Your Computer • Booting – the computers ability to bring itself to an operable state without user intervention. • Soft boot – turning the system on by using the OS. • Usually a fast boot process. • Hard boot – turning the computer on with an on/off switch. • More stressful on the machine.

  27. Booting Up Your Computer • If you have the choice, always perform a soft boot. • If you have to perform a hard boot, wait a few seconds before you turn the computer back on.

  28. Startup BIOS Controls the Beginning of the Boot • Step 1: Startup BIOS runs the power on self test (POST) and assigns resources. • Step 2: The ROM BIOS startup program searches for and loads the OS. • Step 3: The OS configures the system and completes its own loading. • Step 4: Application software is loaded and executed.

  29. POST and Assignment of System Resources • Steps Used In POST • When the power is first turned on, the system clock begins to generate clock pulses. • The CPU begins working and initializes itself. • The CPU turns to memory address FFFF0h, which is the memory address always assigned to the first instruction in the ROM BIOS to run POST. • This instruction directs the CPU to run the POST test. • POST first checks the BIOS program operating it, and then tests CMOS RAM.

  30. POST and Assignment of System Resources • A test determines that there has not been a battery failure. • Hardware interrupts are disabled. • Tests are run on the CPU. • A check determines if this is a cold boot, and hardware is inventoried. • Hardware devices are tested and configured. • Some devices are sent to Sleep Mode to save electricity. • CMOS setup is ran if requested. • BIOS begins its search for an OS.

More Related