Académique Documents
Professionnel Documents
Culture Documents
After learning this chapter, student should be able to; Define and explain the fundamental units in computer Define the basic elements of a microprocessor Explain the discuss multicore processors Explain pipelining, multitasking and multithreading Distinguish between assembly language and machine language Compare different types of interrupt: polled I/O, interrupt driven I/O and software interrupts Define and explain the advantage of DMA Define and explain type of buses
Memories and Storage Store program instructions and data Several types
RAM stores temporary programs and data. The RAM is volatile, meaning that the information is lost if power is turned off or fails. Therefore, any data or program that needs to be saved should be moved to nonvolatile memory (eg: CD or hard disk) before power is removed. ROM also known as firmware stores permanent system program called Basic Input/Output System (BIOS) and certain location system programs in memory. Cache small RAM used to store limited amount of frequently used data that can be accessed much faster than the main RAM. Hard disk is the nonvolatile major storage used to store high level OS, application software and data files. Removable storage is external storage such as CDs, floppy disk, thumb drive, ZIP disk.
ROM
Parallel bus:
The most common parallel bus is simply called the parallel bus which connects to a port commonly referred to as printer port. Another example of parallel bus for connecting lab instruments to a computer is called the General Purpose Interface Bus (GPIB).
2. Microprocessors Microprocessor Buses Three buses for microprocessors allow data, addresses and instructions to be moved. The address bus is used by the microprocessor to specify a location in memory or external device. Some processors have 64 address lines and can access 1.8 x 1019 locations. The data bus transfers data and instruction codes to and from memory and I/O ports. The control bus coordinates operations and communicates with external devices.
2. Microprocessors Processing Operations in Single Core and Multicore Processors Single Core processors
The Intel microprocessors up through the Pentium were all single core processors, meaning they had only one microprocessor in an IC. Eg: When a single core processor such as the Pentium runs multiple programs (multitasking), its has to divide its time between all of the programs by assigning different time slices to each one. This process increases the time it takes to complete a given program.
Multicore processors can execute more than one instruction at a time. This process is also called multiprocessing.
Multicore Processors
Many newer processors have more than one core on a single IC with its own memory cache. The cores operate in parallel and can run program much faster than a single core chip. Eg: Intel offers dual-core and quad-core processor such as Intel core 2 processors.
An example of multiprocessing is when two processors work on an image at the same time to adjust the contrast. The work is sectioned so that each processor works on only one part.
2. Microprocessors
technique where the microprocessor begins executing the next instruction in a program before the previous instruction has been completed Several instructions are in the pipeline simultaneously, each at a different processing stage. Pipelining results in much shorter overall execution times
Multitasking is a technique that allows a computer to perform more than one task. Unlike multiprocessing, the work only appears to be simultaneous because of the speed of the processor.
2. Microprocessors Multithreading
Is
the process of executing different parts of a single program, called threads, simultaneously. Is an extension of the multitasking concept. Instead of multiple programs, multithreading involves multiple threads within a single program. A thread is a single sequence of execution within a program. OS of a computer not only can run multiple programs but it also can run multiple threads within each program
Assembly language must written for the specific processor it will be used on and the programmer must understand the register structure of the processor. An assembler converts the source code to the machine code.
Assembly language program (Source program) Assembler Machine language program (Object program)
4. Interrupts
In microprocessor based systems such as the PC, peripheral devices (eg: printer, keyboard) require periodic service from the CPU. The term service means sending data or to taking data from the device or performing some updating process. Interrupt is a signal or instruction that causes the current process to be temporarily stopped while a service routine is run. There are three ways to start a service routine for a peripheral device. These are: Polled I/O the CPU tests each device one at a time to check if it needs service. If it does, the service routine is invoked. Polling is suitable for devices that can be serviced at regular and predictable intervals and only in situations in which there are no priority considerations. Interrupt driven I/O the peripheral device requests service by sending an interrupt request signal. The CPU acknowledges the interrupt, fetches the service routine, and returns to its program when the routine is completed. Software interrupts a software interrupt is issued from software rather than external hardware. After the interrupt occurs, the steps are the same as with a hardware interrupt. Defined by the BIOS and DOS to perform many of the I/O operations such as reading and writing data to the disk, writing data to the display and reading data from the keyboard.
6. Bus Standards
Can be thought as a highway for digital signal It is a physical connection of printed circuit traces or wires Basically categorized into; 1) Internal buses Local Bus, PCI Bus, ISA Bus. 2) External buses 3) Serial I/O interface buses RS-232, IEEE 1394, USB 4) Parallel I/O interface buses IEEE 488, SCSI External and I/O buses provide interface the computer system to the peripheral equipment such as monitor, printer, keyboard, mouse and removable storage
24
26
6. Bus Standards Parallel I/O Interface Buses Small Computer System Interface (SCSI)
Widely used in personal computer 25-pin cable consists of eight data lines ad support 8Mbps Can connect up to 16 devices Your USB port is good at carrying the data and electricity required for small electronic devices that do things like create and store pictures and music files. But that bus isn't big enough to support a whole computer, a server or lots of devices simultaneously. It's a fast bus that can connect lots of devices to a computer at the same time, including hard drives, scanners, CD-ROM/RW drives, printers and tape drives. Fully replaced by FireWire
Example: GPIB
Describe the operation when a talker send data to the listener depicted by the GPIB timing diagram of Figure 1. Develop a basic block diagram of the system involved in this operation.
Figure 2: Timing diagram for the GPIB handshaking sequence The GPIB handshaking signals: Data transfer control bus When ATN is high, it causes the listeners to interpret data as a command from the controller (talker) and activates the handshaking function. Now, NRFD, DAV and NDAC is activated. When a listener is ready to accept data, the NRFD signal goes high. After the talker detects a HIGH on the NRFD line, a LOW is placed on this line by the talker when the data on its I/O are settled and valid. The first two bytes of data (3F and 41) issend to a listener assigned by address 001A and second two bytes of data (C8 and AD) is send to listener with address 001B. After the data is accepted by listener, the NDAC line will go high.
1. In a computer, the address bus is a a. one way bus from the CPU b. one way bus to the CPU c. two way bus between the CPU and memory d. two way bus between the CPU and ports
2. A example of software that resides in ROM (firmware) is a. assembly language b. application software c. the BIOS d. all of the above
3. The part of a microprocessor that translates the programming instruction into an address where microcode resides is the a. ALU b. instruction decoder c. register array d. control unit
4. The part of a microprocessor that fetches the next instruction from memory is called the a. ALU b. BIU c. EU d. bus controller
5. The figure illustrates the segment/offset method of addressing used in Intel processors. The advantage of this method is a. code can be easily relocated b. a smaller address bus can be used c. addresses can be pipelined d. the clock speed can be increased
16-bit segment base address 16-bit offset address
6. An advantage to assembly language is that it is a. fast and efficient b. easier to write programs c. can be used on any processor d. all of the above
7. Information given to an assembler such as where to begin executing instructions is provided by a. the BIOS b. system programs c. executable instructions d. assembler directives
8. The CPU is not involved in a. arithmetic instructions b. loop instructions c. software interrupts d. direct memory access
9. For the circuit shown, the output will be a. LOW b. HIGH c. high impedance d. not enough information to tell
HIGH
10. The IEEE 488 bus standard a. is a serial bus with 2 types of devices
?
b. is a parallel bus with 2 types of devices c. is a serial bus with 3 types of devices d. is a parallel bus with 3 types of devices
LOW
Answers: 1. a 2. c 3. b 4. b 5. a 6. a 7. d 8. d 9. c 10. d