Professional Documents
Culture Documents
Basic Structure of Computers Machine instructions and their execution System software that enables the preparation and execution of programs Performance issues in the computer.
Functional Units
A computer consists of five functionally independent main parts: Input Memory Arithmetic and Logic Output Control unit Two types of information are handled by a computer: instructions and data. Instructions are commands that: Govern the transfer of information within a computer as well as between the computer and its I/O devices Specify the arithmetic and logic operations to be performed. Data are numbers and encoded characters that are used as operands by the instructions.
Input
Output
Control
I/O
Processor
n bits
. . .
i-th Word
. .
Last Word Memory Words
. . .
b1
b0
Sign bit : b31=0 for positive numbers b31=1 for negative numbers (a) A signed integer 8 bits 8 bits 8 bits 8 bits
ASCII character
ASCII character
ASCII character
ASCII character
Memory
MAR PC IR
ALU
Bus Structures
To form an operational system, these parts must be connected in some organized way. The simplest way to interconnect functional units is to use a single bus. All units are connected to this bus. Only two units can actively use the bus at any given time. Bus controls lines are used to to arbitrate multiple requests for use of the bus. The devices connected to a bus vary widely in their speed of operation. Memory and processor units operate at faster speeds. Because all these devices must communicate with each other over a bus, an efficient transfer mechanism is necessary.
Input
Output
Memory
Processor
Single-bus structure
Software
In order for a user to enter and run an application program, the computer must contain some system software. System software is a collection of programs that are executed as needed to perform functions such as: Receiving and interpreting user commands Entering and editing application programs and storing them as files in secondary storage devices. Managing the storage and retrieval of files in secondary storage devices. Running standard application programs such as word processors, spreadsheets, or games. Controlling I/O units to receive input information and produce output results. Translating programs from source into object form Linking and running user-written application programs with existing standard library routines. System software is thus responsible for the coordination of all activities in a computing system.
Printer
Disk
OS routine Program
t3
t4
Time
t5
Performance
The most important measure of the performance of a computer is how quickly it can execute programs. For best performance it is necessary to design the compiler, the machine instruction set, and the hardware in a coordinated way. Just as the elapsed time for the execution of a program depends on all units in a computer system, the processor time depends on the hardware involved in the execution of individual machine instructions. This hardware comprises the processor and the memory, which are connected by a bus. The processor and a relatively small cache memory can be fabricated on a single integrated circuit chip. With this logic basic steps of instruction processing is very high.
Main Memory
Cache memory
Processor
Bus
Performance Parameters
Processor Clock The length P of one clock cycle affects the processor performance. The clock rate R = 1/P Basic Performance Equation The program execution time is given by T = (N * S)/R N = machine language instructions, S = number of basic steps to execute one machine instruction. Pipelining and Superscaler operation increases the rate of executing Instructions. Clock rate IC technology to increase value of R, reduce P. Instruction Set - CISC and RISC based designs. Compiler - To make good use of instruction set, optimizing compiler.
Performance Measurement
The computer community adopted the idea of measuring computer performance using benchmark programs. To make comparisons possible, standardized programs must be used. The performance measure is the time it takes a computer to execute a given benchmark. A non-profit organization called System Performance Evaluation Corporation (SPEC) selects and publishes the benchmark programs. Running time on the reference computer SPEC rating = -------------------------------------------------------Running time on the computer under test The SPEC rating is a measure of the combined effect of all factors affecting performance, including the compiler, the operating system, the processor and the memory of the computer.
Memory
Up to 2k addressable locations
Synchronous DRAM
DRAMs whose operation is directly synchronized with a clock signal, are called synchronous DRAMs (SDRAMs). Double Data Rate SDRAM The data transfer is done at both edges of the clock, the bandwidth is doubled for long burst transfers.
Read-Only Memories
Both SRAM and DRAM chips are volatile, which means that they lose the stored information if power is turned off. Nonvolatile memory that holds the instructions which is used in loading the boot program from the disk., a memory of this type is called read-only memory (ROM). ROM PROM EPROM EEPROM FLASH Memory
Processor Processor Increasing size Registers Primary Cache L1 Increasing speed Increasing cost per bit
Secondary Cache L2
Main memory
Cache Memories
The speed of the main memory is very low in comparison with the speed of processors. For good performance, the processor cannot spend much of its time waiting to access instructions and data in main memory. An efficient solution is to use a fast cache memory which essentially makes the main memory appear to the processor to be faster than really is.
Processor
Cache
Main memory
Virtual Memories
Techniques that automatically move program and data blocks into the physical main memory when they are required for execution are called virtual memory technique. The binary addresses that processor issues for either instructions or data are called virtual or logical addresses. These logical addresses are translated physical addresses by a combination of hardware and software components.
Processor Virtual address Data MMU Physical address Cache Data Main memory Physical address
DMA transfer
Address Translation
A simple method for translating virtual addresses into physical addresses is to assume that all programs and data are composed of fixed length units called pages. Each virtual address generated by the processor, is interpreted as a virtual page number followed by an offset that specifies the location of a particular word with in a page. Information about the main memory location of each page is kept in a page table. An area in the main memory that can hold one page is called a page frame. The starting address of the page table is kept in a page table base register.
Offset
Page frame
Offset
Secondary Storage
Large storage requirements of most computer systems are economically realized in the form of magnetic disks, optical disks, and magnetic tapes which are usually referred as secondary storage devices. The virtual memory mechanism makes interaction between the disk and the main memory transparent to the user.