Notes of SY CSE, CO UNIT I_CO_final_pdf.pdf - Study Material
Page 1 :
mUNIT I, Introduction, Concept of computer organization and architecture:, Computer architecture refers to those attributes of a system visible to a programmer, or put, another way, those attributes that have a direct impact on the logical execution of a program., Computer organization refers to the operational units and their interconnection that realize the, architecture specification., For examples, architecture attributes include the instruction set, the number of bits to represent, various data I/O mechanisms, and technique for addressing memory. Whereas, organization, attributes include those hardware details transparent to the programmer, such as control signals,, interfaces between the computer and peripherals, and the memory technology used., In computer science and engineering, computer architecture is the practical art of defining the, structure and relationship of the subcomponents of a computer. As in designing the architecture, of buildings, architecture can comprise many levels of information. Computer architecture is, primarily logical, positing a conceptual system that serves a particular purpose. Computer, organization helps optimize performance-based products., Differences between computer organization and architecture:, Computer organization is how operational attributes are linked together and contribute to realize, the architectural specifications., Computer architecture is the architectural attributes like physical address memory, CPU and how, they should be made and made to coordinate with each other keeping the future demands and, goals in mind., A computer's architecture is its abstract model and is the programmer's view in terms of, instructions, addressing modes and registers. A computer's organization expresses the realization, of the architecture. Architecture describes what the computer does and organization describes, how it does it., Computer Architecture, Computer Architecture is concerned with the, way hardware components are connected, together to form a computer system., , Computer Organization, Computer Organization is concerned with, the structure and behaviour of a computer, system as seen by the user.
Page 2 :
It acts as the interface between hardware and, software., , It deals with the components of a connection, in a system., , Computer Architecture helps us to understand the Computer Organization tells us how exactly, functionalities of a system., all the units in the system are arranged and, interconnected., A programmer can view architecture in terms of, instructions, addressing modes and registers., , Whereas Organization expresses the, realization of architecture., , While designing a computer system architecture, is considered first., , An organization is done on the basis of, architecture., , Computer Architecture deals with high-level, design issues., , Computer Organization deals with low-level, design issues., , Architecture involves Logic (Instruction sets,, Addressing modes, Data types, Cache, optimization), , Organization involves Physical Components, (Circuit design, Adders, Signals, Peripherals), , *****Von Neumann and Harvard architectures:, Von Neumann architecture:, Von Neumann Architecture is a digital computer architecture whose design is based on the concept of stored, program computers where program data and instruction data are stored in the same memory. This architecture, was designed by the famous mathematician and physicist John Von Neumann in 1945., It’s a theoretical design based on the concept of stored-program computers where program data and instruction, data are stored in the same memory., The Von Neumann architecture consists of three distinct components: a central processing unit (CPU),, memory unit, and input/output (I/O) interfaces. The CPU is the heart of the computer system that consists of, three main components: the Arithmetic and Logic Unit (ALU), the control unit (CU), and registers., The ALU is responsible for carrying out all arithmetic and logic operations on data, whereas the control unit, determines the order of flow of instructions that need to be executed in programs by issuing control signals to, the hardware., The registers are basically temporary storage locations that store addresses of the instructions that need to be, executed. The memory unit consist of RAM, which is the main memory used to store program data and, instructions. The I/O interfaces allows the users to communicate with the outside world such as storage devices.
Page 3 :
fig.Von neumann architecture, Harvard Architecture:, Harvard Architecture is the digital computer architecture whose design is based on the concept where there are, separate storage and separate buses (signal path) for instruction and data. It was basically developed to, overcome the bottleneck of Von Neumann Architecture., It is a computer architecture with physically separate storage and signal pathways for program data and, instructions. Unlike Von Neumann architecture which employs a single bus to both fetch instructions from, memory and transfer data from one part of a computer to another, Harvard architecture has separate memory, space for data and instruction., The idea behind the Harvard architecture is to split the memory into two parts – one for data and another for, programs. The terms was based on the original Harvard Mark I relay based computer which employed a, system that would allow both data and transfers and instruction fetches to be performed at the same time., , Fig. Harvard architecture
Page 4 :
Difference between Von neumann and harvard architecture:, Harvard architecture, , Von Neumann architecture, , Harvard architecture – diagram, , Von Neumann architecture – diagram, , The name is originated from “Harvard Mark I” a, relay based old computer., , It is named after the mathematician and early, computer scientist John Von Neumann., , It required two memories for their instruction, and data., , It required only one memory for their instruction and, data., , Design of Harvard architecture is complicated., , Design of the von Neumann architecture is simple., , Harvard architecture is required separate bus for Von Neumann architecture is required only one bus, instruction and data., for instruction and data., Processor can complete an instruction in one, cycle, , Processor needs two clock cycles to complete an, instruction., , Easier to pipeline, so high performance can be, achieve., , Low performance as compared to Harvard, architecture., , Comparatively high cost., , It is cheaper.
Page 5 :
Fundamental unit:, A computer in its simplest form consists of five components. They are: input, output, memory,, arithmetic and logic unit, and control unit as shown in the Figure, , Fig. Functional units of a computer, The operations performed by a computer using the functional units can be summarized as, follows:, It accepts information (program and data) through input unit and transfers it to the memory, Information stored in the memory is fetched, under program control, into an arithmetic and, logic unit for processing, Processed information leaves the computer through an output unit, The control unit controls all activities taking place inside a computer., A Computer has five functional independant units like Input Unit, Memory Unit, Arithmetic &, Logic Unit, Output Unit, Control Unit., Input Unit:Computers take coded information via input unit. The most famous input device is keyboard., Whenever we press any key it is automatically being translated to corresponding binary code &, transmitted over a cable to memory or proccessor., Memory Unit:It stores programs as well as data and there are two types- Primary and Secondary Memory, Primary Memory is quite fast which works at electronic speed., Programs should be stored in memory before getting executed. Random Access Memory are, those memory in which location can be accessed in a shorter period of time after specifying the, address.
Page 6 :
Primary memory is essential but expensive so we went for secondary memory which is quite, cheaper. It is used when large amount of data & programs are needed to store, particularly the, information that we dont access very frequently. Ex- Magnetic Disks, Tapes, Arithmetic & Logic Unit:All the arithmetic & Logical operations are performed by ALU and this operation are initiated, once the operands are brought into the processor., Output Unit: – It displays the processed result to outside world., Computer function and interconnection:, The main function of a computer is to run programs. The computers are used today for an almost, unlimited range of applications. However, irrespective of the application for which a computer is, used we can identify a few basic functions that are performed by all computers., All the computer applications make use of these basic functions of computers in different ways, and combinations. There are basically four basic functions of computers. They are input, storage,, processing and output. These are described below:, 1. INPUT:, This is receiving or accepting information from outside sources. We input data and, instructions through input devices which are keyboard, mouse, scanner, etc., The most common way of performing input function is through the information entered, through the keyboard and the click of mouse. Of course, there are many other types of, devices for receiving such information - for example, the web cam., Computers are also able to receive information stored in other devices like DVD disks, and pen drives. Computers are also able to receive information from other computers and, similar devices. When we use computers for automatic control of machines and processes,, computers can also receive information directly from such equipments and processes., 2. PROCESSING:, The computer processes data. This is really the core of computer operation. The computer, processes the data that is fed to the computer by various means and the data already, contained in internal memory to produce the results that is the core of all computer, applications, which is done by the Central Processing Unit (CPU)., 3. OUTPUT:, After processing the data the computer gives the result as an output. Output devices are, the monitor (in the case of visual output), speakers (in the case of audio output), printers,, etc. The results of the processing are made available for use by any user or other devices.
Page 7 :
When a computer is connected to other devices, including through Internet, this output is, in the form of electrical pulses. The output data can also be recorded on to an external, recording medium such as a DVD disk., 4. STORAGE-:, We can save our data for future use in the computer itself. There are several storage, devices also like removable disks, CDs, etc. The information in the computer is stored in, computer in several different ways depending on how the information is used., For simplicity we will classify in two broad categories. First is the memory in the central, processing unit of the computer, and second is the auxiliary memory. The auxiliary, memory includes devices such as fixed hard drives, Computer interconnection:, , A Computer consists of a set of components (CPU, I/O, memory), that communicates with each other. Collection of paths connecting various computer components, is known as Interconnection Structures., The design of this structure will depend on the exchange that must be made between modules., The various types of exchanges/transfers are: Memory to CPU, CPU to Memory, I/O to CPU,, CPU to I/O, I/O to or from Memory (Direct Memory Access (DMA))., BUS INTERCONNECTION:, Bus:, A Bus is a collection of wires or distinct lines meant to carry data, address and control, information. The functional components of a computer must be connected in order to make a, system operational. The connections can be made in several ways using a Bus., Data Bus: it is used for transmission of data. The number of data lines corresponds to the, number of bits in a word., Address Bus: it carries the address of the main memory location from where the data can be, accessed., Control Bus: it is used to indicate the direction of data transfer and to coordinate the timing of, events during the transfer., The different functional units of a computer can be connected through a bus structure such as:, A Single-bus structure, A Two-bus structure, SINGLE-BUS STRUCTURE:, All units are connected to a single bus as shown in Figure below. The, bus can be used for only one transfer at a time since only two units can actively use the bus at, any given instant of time. When multiple requests arise for the use of bus, then the Bus control, lines are used for managing it. The primary advantage of this structure is its low cost and, flexibility for attaching peripherals. But the drawback is its low operating speed. This type of, structure is mainly found in small computers such as minicomputers and microcomputers.
Page 8 :
Fig.Single-bus Structure, TWO-BUS STRUCTURE:, The bus is said to perform two distinct functions by connecting the I/O, units with memory and processor unit with memory. The processor interacts with the memory, through a memory bus and handles input/output functions over I/O bus. The I/O transfers are, always under the direct control of the processor, which initiates transfer and monitors their, progress until completion. The main advantage of this structure is good operating speed but on, account of more cost., , Fig A. Two-bus Structure, CPU structure and function:, CPU must do the following things:, , , , , , , Fetch instruction: The CPU reads an instruction from memory., Interpret instruction: The instruction is decoded to determine what action is required., Fetch data: The execution of an instruction may require reading data from memory or an I/O, module., Process data: The execution of an instruction may require performing some arithmetic or logical, operation on data., Write data: The results of an execution may require writing data to memory or an I/O module., To do these things, it should be clear that the CPU needs to store some data temporarily. It must, remember the location of the last instruction so that it can know where to get the next instruction., It needs to store instructions and data temporarily while an instruction is being executed. In other, words, the CPU needs a small internal memory., Following figure shows simplified view of a CPU, indicating its connection to the rest of the, system via the system bus. The major components of the CPU are an arithmetic and logic, unit (ALU) and a control unit (CU). The ALU does the actual computation or processing of data.
Page 9 :
The control unit controls the movement of data and instructions into and out of the CPU and, controls the operation of the ALU. In addition, the figure shows a minimal internal memory,, consisting of a set of storage locations, called registers., , Fig. The CPU with the System Bus, Below figure is a slightly more detailed view of the CPU. The data transfer and logic control, paths are indicated, including an element labeled internal CPU-bus. This element is needed to, transfer data between the various registers and the ALU because the ALU in fact operates only, on data in the internal CPU memory., , Fig.CPU Internal Structure, Register organization, Within the CPU, there is a set of registers that function as a level of memory above main, memory and cache in the hierarchy. The registers in the CPU perform two roles:, , , , User-visible registers: These enable the machine- or assembly-language programmer to, minimize main memory references by optimizing use of registers., Control and status registers: These are used by the control unit to control the operation of the, CPU and by privileged, operating system programs to control the execution of programs.There is, not a clean separation of registers into these two categories.
Page 10 :
User-Visible Registers, A user-visible register is one that may be referenced by means of the machine language that the, CPU executes. We can characterize these in the following categories:, , , , , , General purpose, Data, Address, Condition codes, General-purpose registers: can be assigned to a variety of functions by the programmer., Sometimes their use within the instruction set is orthogonal to the operation., For example, there may be dedicated registers for floating-point and stack operations. In some, cases, general-purpose registers can be used for addressing functions (e.g.. register indirect,, displacement). In other cases, there is a partial or clean separation between data registers and, address registers., Data registers may be used only to hold data and cannot be employed in the calculation of an, operand address., Address registers may themselves be somewhat general purpose, or they may be devoted to a, particular addressing mode., Examples include the following:, , , , , , , Segment pointers: In a machine with segmented addressing, a segment register holds the, address of the base of the segment. There may be multiple registers: for example, one for the, operating system and one for the current process., Index registers: These are used for indexed addressing and may be auto indexed., Stack pointer: If there is user-visible stack addressing, then typically the stack is in memory and, there is a dedicated register that points to the top of the slack., Condition codes register (also referred to as flags): Condition codes are bits set by the CPU, hardware as the result of operations. For example, an arithmetic operation may produce a, positive, negative, zero, or overflow result. In addition to the result itself being stored in a, register or memory, a condition code is also set. The code may subsequently be tested as part of a, conditional branch operation., Control and Status Registers, There are a variety of CPU registers that are employed to control the operation of the CPU.