TM103-Chapter One.pdf
Document Details
Uploaded by WorthwhileCoralReef1136
Arab Open University
2020
Tags
Related
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-24-101-1-9 copy.pdf
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-24-101-9-11.pdf
- Computer Organization and Design RISC-V Edition PDF
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-24-101-54-65.pdf
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-102-258-pages-2.pdf
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-102-258-pages-3.pdf
Full Transcript
Chapter One Introduction to Computer Organization & Architecture Course description (1/3) ▪ Course name TM103 - Computer Organization and Architecture ▪ Course level Level 1 course Equivalent to 4 CH (Credit Hours) ▪ Assessment...
Chapter One Introduction to Computer Organization & Architecture Course description (1/3) ▪ Course name TM103 - Computer Organization and Architecture ▪ Course level Level 1 course Equivalent to 4 CH (Credit Hours) ▪ Assessment Continuous Assessment (CA) : 50% - 1 TMA (Tutor Marked Assignment) : 20% - 1 MTA (Mid-Term Assessment): 30% Final Exam: 50% 27 March 2020 TM103- Arab Open University 2 Course description (2/3) ▪ Success Requirements Get at least 15/50 on the CA (TMA + MTA) Get at least 20/50 on the Final Exam Get at least a total of 50/100 (TMA + MTA + Final) 27 March 2020 TM103- Arab Open University 3 Course description (3/3) ▪ Reference Book The Essentials of Computer Organization and Architecture, 4th Edition – Author: Linda Null and Julia Lobur. ▪ Chapters to be covered 1, 2, 3, 4, 5 ( partially),and 6 ▪ Topics to be covered See the course calendar 27 March 2020 TM103- Arab Open University 4 Lecture Overview Introduction to this Lecture's activities In this lecture, you will be introduced to the significance of Computer Organization and Architecture, and you will have a look at the common components of a computer system. This lecture introduces the necessary concepts for the journey through the course, including the necessary terminology, the basic components in a computer system, the various logical levels of a computer system. After completing the lecture, you will be able to: 1. Identify the difference between computer organization and computer architecture. 2. Apply units of measurement common to computer systems. 3. Describe the Computer Level Hierarchy 27 March 2020 TM103- Arab Open University 5 Lecture Overview ▪ Chapter 1 : Introduction Overview of computer organization and architecture The main components of a computer An example system The computer level hierarchy 27 March 2020 TM103- Arab Open University 6 1.1 Overview Why study Computer Organization and Architecture? One of the most important tasks computer scientists are usually concerned with, is writing complex program algorithms rather than with designing computer hardware. Certainly, if we want our algorithms to be feasible, a computer eventually has to run them. The execution time of many complex algorithms may vary due to many factors other than the structure of the algorithm itself. Some algorithms could be so complicated that they would take too long to run on some systems, and very fast on others. Why? To understand why an algorithm works well on a computer system and seems to be infeasible on another, you have to understand the relation between the hardware and the software. Therefore, it is very important that we understand how hardware interacts with software. We need to become aware of how the computer components fit together to produce a working computer system. Studying computer organization and architecture will help understand this interaction between software and hardware. 27 March 2020 TM103- Arab Open University 7 1.1 Overview Computer organization involves all the physical features of computer systems. It addresses issues such as control signals, signaling methods, and memory types. It helps you to answer the question: How does a computer work? Computer Architecture addresses the behavior and the structure of the computer system as seen by the programmer. It encompasses many elements such as the instruction sets, data types, the number of registers, addressing modes, main memory access, and various I/O mechanisms. The architecture of the system directly affects the logical execution of the programs. Therefore, studying computer architecture helps you to answer the question: How do I design a computer? The computer architecture for a given machine is the combination of its hardware components plus its instruction set architecture (ISA). ISA is the agreed-upon interface between all the software that runs on the machine and the hardware that executes it. The ISA allows you to talk to the machine. 27 March 2020 TM103- Arab Open University 8 1.2 Computer Components Modern computers are actually implementations of algorithms that execute other algorithms. This chain of nested algorithms leads us to the following principle: Principle of Equivalence of Hardware and Software: Any task done by software can also be done using hardware, and any task done by hardware can also be done using software. (Assuming speed is not a concern) A special-purpose computer can be designed to perform any task, such as word processing, certain analysis, or even playing a game. Accordingly, programs can be written to carry out the functions of special-purpose computers, such as the embedded systems situated in your microwave. There are times when a simple embedded system gives us much better performance than a complicated computer program, and there are times when a program is the preferred approach. The principle of equivalence of Hardware and Software tells us that we have a choice. Our knowledge of computer organization and architecture will help us to make the best choice. 27 March 2020 TM103- Arab Open University 9 1.2 Computer Components We begin our discussion of computer hardware by looking at the components necessary to build a computing system. At the simple level, a computer is a device that consists of three components: ✓ A processor to interpret and execute programs ✓ A memory to store both data and programs ✓ A mechanism for transferring data to and from the outside world (Input/Output). We will discuss these three components in details as they relate to computer hardware in the following lectures. Once you understand computers in terms of their component parts, you should be able to recognize what a system is doing at all times and how you could change its behavior if you want to. In the next section, we will present an example system, where you will be introduced to many terms you usually find in each computer advertisement. 27 March 2020 TM103- Arab Open University 10 1.3 An Example System This section will introduce you to some of the terminology that is specific to computers. This terminology can be confusing, inaccurate, and frightening. We believe that with little explanation, we can clear the fog. For the sake of discussion, we have provided a computer advertisement (see Figure 1.1). Figure 1.1: Computer advertisement The ad is typical of many that it bombards you with phrases such as 16GB DDR3 SDRAM, PCIe, and L1 cache. 11 27 March 2020 TM103- Arab Open University 1.3 An Example System Without having a handle on such terminology, you would be hard pressed to know whether the stated system is a wise buy, or even whether the system is able to serve your needs. Before we explain the ad, however, we need to discuss something even more basic; the measurement terminology. It seems that every field has its own way of measuring things. Let us begin with some basic definitions related to digital computers. A bit is the most basic unit of information in a computer. – It is a state of “on” or “off” in a digital circuit. – Sometimes these states are “high” or “low” voltage instead of “on” or “off.” A byte is a group of eight bits. – A byte is the smallest possible addressable unit of computer storage. – The term, “addressable,” means that a particular byte can be retrieved according to its location in memory. 27 March 2020 TM103- Arab Open University 12 1.3 An Example System A word is a contiguous group of bytes. – Words can be any number of bits or bytes. – Word sizes of 16, 32, or 64 bits are most common. – In a word-addressable system, a word is the smallest addressable unit of storage. A group of four bits is called a nibble. – Bytes, therefore, consist of two nibbles: a “high-order nibble” and a “low- order” nibble For computer people to tell each other how big something is, or how fast it is, they should use the same units of measure. The common prefixes used with computers are given in the tables 1.1 and 1.2. 27 March 2020 TM103- Arab Open University 13 1.3 An Example System Prefix Symbol Capacity Speed Prefix Symbol Weight Milli m 10-3 Kilo K 210 103 Micro µ 10-6 Mega M 220 106 Nano n 10-9 Giga G 230 109 Pico p 10-12 Tera T 240 1012 Peta P 250 1015 Femto f 10-15 Table 1.1: Capacity and Speed prefixes Table 1.2: Time and Space prefixes Measures of capacity and speed: Power-of-10 prefixes are ordinarily used for power, electrical voltage, frequency, and data rate (number of bits per second), whereas the power-of-2 prefixes are used for capacity. For example, if your DSL has a data rate of 128kbps, then the k here means 10 3. If a file is 2KB in size, then it is 2x210 bytes. P.S: Note that the uppercase “K” is usually used to refer to the power-of-2 prefix, while the lowercase “k” usually refers to the power-of-10 prefix. In addition, a byte is a set of 8 bits, where “B” is for byte, and “b” is for bit. 27 March 2020 TM103- Arab Open University 14 1.3 An Example System Measures of time and space: Prefixes for these metrics are given in table 1.2. Notice that the fractional prefixes have exponents that are the reciprocal of the prefixes on table 1.1. Therefore, if someone says that an operation requires a microsecond to complete, you should also understand that a million of these operations could take place in one second. Now back to the ad, you can see that the microprocessor in the ad is an intel i5 Quad core, which means that it is essentially four processors, and it belongs to the multicore processors type. This will speed up the processing power of the computer. The microprocessor is the “brain” of the system. It executes program instructions. This one is an Intel i5 running at 2.2GHz. The fact that this microprocessor runs at 2.2GHz, however, does not necessarily mean that it can execute 2.2 trillion instructions per second. Later, you will see that each computer instruction requires a fixed number of cycles to execute. The number of instructions per second that a microprocessor can execute is proportionate to its clock speed. 27 March 2020 TM103- Arab Open University 15 1.3 An Example System The clock sends electrical pulses simultaneously to all main components. The number of pulses emitted each second by the clock is its frequency. Frequencies are measured in hertz (Hz). Nowadays, the entry-level of the clock speed is in GHz. Computers with large main memory capacity can run larger programs with greater speed than computers having small memory capacity. RAM is an acronym for random access memory. Random access means that memory contents can be accessed directly if you know its location, which means that the needed access time to retrieve a certain piece of data will be short. Cache is a type of temporary memory that can be accessed faster than RAM. The system in our advertisement has two kinds of cache. Level 1 cache is small, fast memory that is built into the microprocessor chip, and helps speed up access to frequently used data. Level 2 cache is a collection of fast, built-in memory chips situated between the microprocessor and the main memory. This system has two levels of cache memory, the level1 (L1) cache is smaller and (Usually) faster than the L2 cache. Note that these cache sizes are measured in KB and MB. (For more information on different types of memory, refer to chapter 6) 27 March 2020 TM103- Arab Open University 16 1.3 An Example System Hard disk capacity determines the amount of data and size of programs you can store. This one can store 1TB. 7200 RPM is the rotational speed of the disk. Generally, the faster a disk rotates, the faster it can deliver data to RAM. (There are many other factors involved as well) SATA stands for serial advanced technology attachment, which describes how the hard disk interfaces with (or connects to) other system components. A DVD can store about 4.7GB of data. This drive supports rewritable DVDs, +/-RW, that can be reused to store data many times; 24x describes its speed. Ports allow movement of data between a system and its external devices. This system has ten ports. 27 March 2020 TM103- Arab Open University 17 1.3 An Example System Serial ports send data as a series of pulses along one or two data lines (low data rate) Parallel ports send data as a single pulse along at least eight data lines ( better data rate) USB, Universal Serial Bus, is an intelligent serial interface that is self-configuring. (It supports “plug and play.”) ( best data rate) A bus is a group of wires that moves data and instructions to various places within a computer. Bus speed ultimately sets the upper limit on the system’s information- carrying capability. Additional dedicated Input/ Output (I/O) buses can improve system buses. PCI, peripheral component interface, is one such bus. This system has two PCIe (PCI express) devices: a video card and a sound card. The video card contains memory and programs that support the monitor. All through the remainder of the lectures, you will see how these components work and how they interact with software to make complete computer systems. 27 March 2020 TM103- Arab Open University 18 Standards Organizations The previous statement raises two important questions: What guarantee do we have that computer components will operate as we expect? What assurance do we have that computer components will operate together? Many organizations set computer hardware standards in order to include the interoperability of computer components. Some of the most important standards-setting groups are: The Institute of Electrical and Electronic Engineers (IEEE) The International Telecommunications Union (ITU) The American National Standards Institute (ANSI) The British Standards Institution (BSI) The International Organization for Standardization (ISO) 27 March 2020 TM103- Arab Open University 19 1.4 The Computer Level Hierarchy As a user, you usually execute programs on a computer (Word-processing, Spreadsheet, etc.). Actually, you are outside the computer, and you use input and output devices to communicate with the computer. Now, what happens inside the computer? To understand the whole process, we will use a “divide and conquer” approach. Imagine the computer as a hierarchy of levels (table 1.3), in which each level has a specific function. Memorize this table! Table 1.3: Hierarchy levels 27 March 2020 TM103- Arab Open University 20 1.4 The Computer Level Hierarchy Level 6: User’s level: Level 6 is composed of applications User runs programs such as word processors, graphics packages, or games. Level 5: High-Level Language Level Consists of languages such as C, C++, FORTRAN, Lisp, Pascal, and Prolog. Programmers write programs at this level. Compilers translate these languages to a language the machine can understand (that lower levels could understand): Assembly then machine languages. Level 4: Assembly Language Level More “machine dependent” language. Assembly language is then one-to-one translated to machine language (one assembly language instruction is translated to exactly one machine language instruction). 27 March 2020 TM103- Arab Open University 21 1.4 The Computer Level Hierarchy Level 3: System Software Level Deals with operating system instructions (multiprogramming, protecting memory, synchronizing processes, and various other important functions) Instructions translated from assembly language to machine language are passed through this level unmodified. Level 2: Instruction Set Architecture (ISA), or Machine Level Machine language recognized by the particular architecture of the computer. Programs written in machine language can be executed directly by the electronic circuits without any interpreters, translators, or compilers. Level 1: The Control Level Is where a control unit does its job: o Receives machine instructions from the level above o Decodes and executes those instructions properly o Moves data to where and when it should be o The control unit interprets the machine instructions Level 0: The Digital Logic Level Is where we find the physical components of the computer system: the gates and wires. 27 March 2020 TM103- Arab Open University 22 Summary of the Lecture In this lecture we have covered: The difference between computer organization and computer architecture. Units of measurement common to computer systems. Computer level hierarchy. You should now be sufficiently familiar with general system structure to guide your studies throughout the remainder of this course. Subsequent lectures will explore many of these topics in detail. 27 March 2020 TM103- Arab Open University 23 End of Chapter 1 Try to solve all exercises related to chapter 1