SIT153 Introduction to Computation Lecture 4-1 Computer Organisation I chapter 5 6 April 2016
Admin matters (1) for the next 2 weeks Study units: (4) Computer organisation (5) Networks Week Date Day Activity Topic 6 4 April Mon 5 April Tues 6 April Wed Lectures: L4.1 7 April Thur Lectures: L4.2 Practical 4 8 April Fri Computer organisation Txt. bk. chapter ch 5 7 11 April Mon Lectures: L4.3 (Thursday timetable) 12 April Tues (Friday timetable) 13 April Wed Lectures: L4.4 14April Thur Lectures: L4.5 Practical 5 15 April Fri Computer organisation ch 5 2
Announcements Monday 11 April: THURSDAY TIMETABLE 10:30 to 11:20 lecture 12:30 to 14:30 No prac session Sick Test Date/Time: Monday 11 April, 12:30 to 14:30 Procedure: Submit medical certificate to COSI team before 16:30, Wednesday 6 April 3
To be discussed in this lecture This lecture: the three subsystems of a computer. role of the central processing unit (CPU). main memory and its addressing space. the input/output subsystem. 4
Computer hardware (subsystems) a computer is made up of three subsystems: central processing unit (CPU) main memory input/output subsystem 5.5
5-1 CENTRAL PROCESSING UNIT The central processing unit (CPU) performs operations on data. In most architectures it has three parts: (1) an arithmetic logic unit (ALU) (2) a control unit (3) a set of registers (fast storage locations) 5.6
The arithmetic logic unit (ALU) The arithmetic logic unit (ALU) performs: arithmetic operations logic operations shift operations on data. Central processing unit (CPU) 5.7
Registers Registers are fast storage locations inside CPU that hold data temporarily. Multiple registers are needed to facilitate the operation of the CPU. Some of these registers are: Data registers (R0,..., Rn) Instruction register (IR) Program counter (PC) Central processing unit (CPU) 5.8
The control unit The third component of a CPU is the control unit. The control unit controls the operation of each subsystem. Control is achieved through: signals sent from the control unit to other subsystems. 5.9
5-2 MAIN MEMORY (1) Main memory is the second major subsystem in a computer. It consists of: a collection of storage locations, each with a unique identifier, called an address. 5.10
5-2 MAIN MEMORY (2) Data is transferred to and from memory in groups of bits called bytes or words. A byte is a group of 8 bits, A word can be a group of (8 bits), 16 bits, 32 bits or 64 bits (and growing). 5.11
Address space (1) High level language programs (e.g. C / C++) use variable names to identify memory locations. e.g. char onecharacter; onecharacter = A ; // tells compiler to allocate a byte of //memory for // storing a character code //stores the ASCII code for A in the //memory location allocated to the // variable onecharacter At the hardware level each memory location is identified by an address (a unique numeric value) e.g. in C/C++, the statement: 5.12 cout << &onecharacter; // get the address for the memory //location allocated to // onecharacter and displays it on // the screen
Address space (2) The total number of uniquely addressable memory locations (words) is called the address space. A computer that uses addresses of N bits (e.g. N = 16 bits) can address a memory space of 2 N (e.g. 2 16 ) memory locations. The addresses have values 0, 1, 2,, 2 N -1 e.g. for N = 16, the addresses are 0, 1, 2,, 2 16-1 which is 0, 1, 2,, 65 535 So, in order to be able to address a memory space of M locations (words) we need an address with N = log 2 M bits 5.13 M = 2 N N = log 2 M address range 256 8 0, 1, 2,., 255 65 536 16 0, 1, 2,, 65 535??????? 32 0, 1, 2,.,??????????? 64 0, 1, 2,.,????
5.14 Address space (3)
Memory types (1) Two main types of memory exist: RAM and ROM. Random access memory (RAM) Static RAM (SRAM) Dynamic RAM (DRAM) Read-only memory (ROM) Programmable read-only memory (PROM). Erasable programmable read-only memory (EPROM). Electrically erasable programmable read-only memory (EEPROM). 5.15
Memory types (2) Two main types of memory exist: RAM and ROM. Random access memory (RAM) meaning of random vs. sequantial volatile Static RAM (SRAM) based on (bi-stable) electronic circuits which hold state (0 or 1) as long as power is supplied to circuit Expensive circuits Dynamic RAM (DRAM) 5.16 based on electronic circuits which store electrical charge (energy) through capacitance no charge => 0, charged => 1) low-cost circuits
Memory types (3) Two main types of memory exist: RAM and ROM. Read-only memory (ROM) non-volatile data is written (stored) at time of manufacture e.g. of usage: programs for booting a computer these should never be changed 5.17 Programmable read-only memory (PROM). Erasable programmable read-only memory (EPROM) Electrically erasable programmable read-only memory (EEPROM). variants of ROM that can be re-programmed using special devices
Memory hierarchy Computer users need a lot of memory, especially memory that is very fast and inexpensive. This demand is not always possible to satisfy very fast memory is usually not cheap. A compromise needs to be made. The solution is hierarchical levels of memory. Figure 5.4 Memory hierarchy 5.18
Cache memory Cache memory is: faster than main memory, but slower than CPU registers. Instructions & data are pre-fetched from memory and stored in cache Speeds up program execution. Cache memory, which is normally small in size, is placed between the CPU and main memory. Figure 5.5 Cache memory 5.19
5-3 INPUT/OUTPUT SUBSYSTEM The third major subsystem in a computer is the collection of devices referred to as the input/output (I/O) subsystem. This subsystem allows a computer to: communicate with the outside world (computer users) and store programs and data even when the power is off. I/O devices can be divided into two broad categories: non-storage devices and storage devices. 5.20
Input / Output devices Non-storage devices allow the CPU/memory to communicate with the outside world, but they cannot store information. Keyboard monitor mouse printer etc. Storage devices Storage devices, although classified as I/O devices, can store large amounts of information to be retrieved at a later time. They are cheaper than main memory, and their contents are nonvolatile i.e. not erased when the power is turned off. Sometimes referred to as auxiliary storage devices. 2 categories: (1) magnetic (2) optical. 5.21
Storage devices: magnetic disk Magnetic disk drive consists of: disks (platters), tracks, sectors, R/W head, controller magnetisation (on tracks): 5.22 magnetisation => 1 is stored no magnetisation => a 0 is stored Disk performance affected by: (1) Rotational speed (2) Seek time (3) Latency (3) transfer rate Minimum amount of data for read / write operation = one sector
storage devices: magnetic tape Magnetic tape Sequential access for data Slower and cheaper than disk 5.23
storage devices: optical disk Optical disk: Recording data: use a high-power laser beam Pit => 0 is recorded Land => 1 is recorded Reading data: Use low-power laser beam Light is reflected from surface Intense light => 1 is read soft light => 0 is read Figure 5.24 5.8 Creation and use of CD-ROMs
5.25
Figure 5.9 CD-ROM format 5.26 Figure 5.10 Making a CD-R
5.27 Figure 5.11 Making a CD-RW
5.28
HOMEWORK Do a search on the web to find out what type of technology is used for flash disks. 29