Introduction Lecture 03
COA by Athar Mohsin
Last week Overview • Computer organization – Encompasses all physical aspects of computer systems. – E.g., circuit design, control signals, memory types. – How does a computer work?
• Computer architecture – Logical aspects of system implementation as seen by the programmer. – E.g., instruction sets, instruction formats, data types, addressing modes. – How do I design a computer?
• At the most basic level, a computer is a device consisting of three pieces: – 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. COA by Athar Mohsin
Measuring units • Hertz = clock cycles per second (frequency) – 1MHz = 1,000,000Hz – Processor speeds are measured in MHz or GHz.
– cycle time is the reciprocal of clock frequency. • A bus operating at 133MHz has a cycle time of 7.52 nanoseconds: 133,000,000 cycles/second = 7.52ns/cycle
• Byte = a unit of storage – – – –
•
1KB = 210 = 1024 Bytes 1MB = 220 = 1,048,576 Bytes Main memory (RAM) is measured in MB Disk storage is measured in GB for small systems, TB for large systems.
Millisecond = 1 thousandth of a second – Hard disk drive access times are often 10 to 20 milliseconds.
•
Nanosecond = 1 billionth of a second – Main memory access times are often 50 to 70 nanoseconds.
•
Micron (micrometer) = 1 millionth of a meter – Circuits on computer chips are measured in microns.
COA by Athar Mohsin
An Example System • Computers with large main memory capacity can run larger programs with greater speed than computers having small memories. – RAM is an acronym for random access memory. Random access means that memory contents can be accessed directly if you know its location. – Cache is a type of temporary memory that can be accessed faster than RAM.
• I/O Ports – Serial ports send data as a series of pulses along one or two data lines. – Parallel ports send data as a single pulse along at least eight data lines. – USB, Universal Serial Bus, is an intelligent serial interface that is selfconfiguring. (It supports “plug and play.”) COA by Athar Mohsin
Structure & Function • A computer is a complex system contains millions of electronic components – Best is to recognize the hierarchical nature of complex system • A hierarchical system is a set of interrelated subsystem • A hierarchical nature of complex system is essential to design and description – Designer will deal to a particular level of the system at any one time – At each level the designer is concerned with the “STRUCTURE and FUNCTION”
• The designer need to deal with a particular level of the system at any one time, and concerned with structure and function at each level – Structure is • the way in which components relate to each other
– Function is • the operation of individual components as part of the structure COA by Athar Mohsin
Function • The basic functions of all computer are: – Data processing • Processor • registers
– Data storage • Primary and secondary memories
– Data movement • Buses • I/O
– Control • Signalling COA by Athar Mohsin
Function • A computer can perform generally four functions – Data processing • Few types of data processing
– Data storage • Temporary • Permanents • On the route to and fro processor
– Data movement • Within or to and fro outside
– Control • Control of data processing, data storage and data movement functions • Control manages the computer resources COA by Athar Mohsin
Function • The computer must be able to process data, that may be in any forms and range • The computer must also store data – Data storage may be short term or for a longer period
• Computer must be able to move data between in and outside the computer – When data are received from or delivered to a device that is directly connected to the computer, the process is known as “ input output” (I/O) – When data is moved over longer distances to or from a remote device, the process is known as “data communication”
• There must be control of data processing, data movement and data storage functions that is done through instructions COA by Athar Mohsin
Operations
COA by Athar Mohsin
Structure • The computer interacts with its external environment – All the linkages to external environment are classified as peripheral devices or communication lines
• The internal structure of the computer is based on four structural components: – Central Processing Unit (CPU): • controls the operation of the computer and performs the date processing functions
– Main Memory: • Store data
– I/O: • Moves data between the computer and its external environment
– System Interconnection: • some mechanism that provides for communication among CPU, main memory and I/O COA by Athar Mohsin
Structure • The computer interact with its external environment – All linkages to the external environment can be classified as peripheral devices or communication lines
• Four main structural components are – central processing unit- CPU refers as “processor” • Controls the operation of the computer and • Performs its data processing functions
– Main memory • Data storage
– I/O: • Moves data between the computer and its external environment
– System interconnection • Provides means of communication COA by Athar Mohsin
The Computer Level Hierarchy • Computers consist of many things besides chips. • Before a computer can do anything worthwhile, it must also use software. • Divide and conquer- a programming technique – Writing complex programs requires a “divide and conquer” approach, where each program module solves a smaller problem.
• Complex computer systems employ a similar technique through a series of virtual machine layers – Imagine the machine is to be built from a hierarchy of levels – Each level has a specific function – Each level executes its own particular set of instruction
COA by Athar Mohsin
The Computer Level Hierarchy • Each virtual machine layer is an abstraction of the level below it. • The machines at each level execute their own particular instructions, calling upon machines at lower levels to perform tasks as required. • Computer circuits ultimately carry out the work.
COA by Athar Mohsin
The Computer Level Hierarchy • Level 6: The User Level or upper level – Program execution and user interface level • E.g., Running word processing
– The level with which we are most familiar. • Level 5: High-Level Language Level – The level with which we interact when we write programs in languages such as C, Pascal, Lisp, and Java • These languages must be translated to machine understandable language – Compilers, interpreters
• Compiled languages are translated into assembly language and then to machine language COA by Athar Mohsin
The Computer Level Hierarchy • Level 4: Assembly Language Level – Acts upon assembly language produced from Level 5, as well as instructions programmed directly at this level – One to one relation- each assembly language instruction is translated to exactly one machine language instruction • Level 3: System Software Level, deals with operating system instructions – responsible for – Controls executing processes on the system. – Protects system resources. – Instructions translated through Assembly language to machine language instructions often pass through Level 3 without modification.
COA by Athar Mohsin
The Computer Level Hierarchy • Level 2: Machine Level or ISA level – Also known as the Instruction Set Architecture (ISA) Level. – Consists of instructions that are particular to the architecture of the machine. – Programs written in machine language need no compilers, interpreters, or assemblers • Programs written in machine language can be executed directly by the electronic circuits without any interpreter, complier or translator
COA by Athar Mohsin
The Computer Level Hierarchy • Level 1: Control Level – Control unit make sure that instructions are decoded and executes properly • A control unit decodes and executes instructions and moves data through the system • Control unit interprets the machine instructions one at a time
– Control units can be microprogrammed or hardwired. • A microprogram is a program written in a low-level language that is implemented by the hardware. • Hardwired control units consist of hardware that directly executes machine instructions – Through control signals that direct data and instruction traffic to appropriate parts of the system – Hardwired control units are very fast being actual physical parts » Once implemented difficult to modified
COA by Athar Mohsin
The Computer Level Hierarchy • Level 0: Digital Logic Level – This level is where we find digital circuits (the chips). – Digital circuits consist of gates and wires. – These components implement the mathematical logic of all other levels.
COA by Athar Mohsin