computer systems architecture - micronet international college

112
Computer Systems Architecture [ Unit 19]

Upload: others

Post on 18-Dec-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Systems Architecture - Micronet International College

Computer Systems Architecture [ Unit 19]

Page 2: Computer Systems Architecture - Micronet International College

Outcomes:

1. Understand how data can be represented within computer systems

2. Understand the functions of computer system components

3. Understand the principles of processor operations.

2

Page 3: Computer Systems Architecture - Micronet International College

Outcome 2: Understand the functions of computer system components

3

Page 4: Computer Systems Architecture - Micronet International College

Outcome 1 4

Key Components ▸ Central Processing Unit ▸ Memory ▸ Interfaces ▸ Buses ▸ Peripherals

Page 5: Computer Systems Architecture - Micronet International College

Outcome 1

Central Processing Unit

5

Page 6: Computer Systems Architecture - Micronet International College

CPU

The central processing unit (CPU) is the unit which performs most of the processing inside a computer.

6

Page 7: Computer Systems Architecture - Micronet International College

CPU

To control instructions and data flow to and from other parts of the computer, the CPU relies heavily on a chipset, which is a group of microchips located on the motherboard.

7

Page 8: Computer Systems Architecture - Micronet International College

CPU

The CPU has two components: ▸ Control Unit ▸ Arithmetic Logic Unit (ALU)

8

Page 9: Computer Systems Architecture - Micronet International College

CPU

Control Unit Extracts instructions from memory and decodes and executes them

9

Page 10: Computer Systems Architecture - Micronet International College

CPU

Arithmetic Logic Unit (ALU) Handles arithmetic and logical operations

10

Page 11: Computer Systems Architecture - Micronet International College

CPU

To function properly, the CPU relies on the system clock, memory, secondary storage, and data and address buses.

11

Page 12: Computer Systems Architecture - Micronet International College

Multicore CPU

Multicore CPUs are also common, in which a single chip contains multiple CPUs. Multiple processors are ideal for intensive parallel tasks requiring multitasking.

12

Page 13: Computer Systems Architecture - Micronet International College

Multicore CPU

Each CPU has an independent interface, separate cache, and individual paths to the system front-side bus.

13

Page 14: Computer Systems Architecture - Micronet International College

CPU 14

Page 15: Computer Systems Architecture - Micronet International College

Outcome 1 15

Key Components ▸ Central Processing Unit ▸ Memory ▸ Interfaces ▸ Buses ▸ Peripherals

Page 16: Computer Systems Architecture - Micronet International College

Outcome 1

Computer Memory

16

Page 17: Computer Systems Architecture - Micronet International College

Memory

Computer memory is any physical device capable of storing information temporarily like RAM (random access memory), or permanently, like ROM (read-only memory).

17

Page 18: Computer Systems Architecture - Micronet International College

Memory Memory devices utilize integrated circuits and are used by operating systems, software, and hardware.

18

Page 19: Computer Systems Architecture - Micronet International College

Memory Types of Memory ▸ Volatile ▸ Non Volatile

19

Page 20: Computer Systems Architecture - Micronet International College

Memory Types of Memory ▸ Volatile ▸ Non Volatile

20

Page 21: Computer Systems Architecture - Micronet International College

Memory

Volatile memory A memory that loses its contents when the computer or hardware device loses power.

21

Page 22: Computer Systems Architecture - Micronet International College

Memory

Computer RAM is an example of a volatile memory and is why if your computer freezes or reboots when working on a program, you lose anything that hasn't been saved.

22

Page 23: Computer Systems Architecture - Micronet International College

Memory

Non-volatile memory, sometimes abbreviated as NVRAM, is a memory that keeps its contents even if the power is lost. Flash memory is an example of a non-volatile memory.

23

Page 24: Computer Systems Architecture - Micronet International College

Memory

Primary Storage: RAM Secondary Storage: Hard Drive

24

Page 25: Computer Systems Architecture - Micronet International College

Memory

Common Type of Memory ▸ SRAM ▸ DRAM

25

Page 26: Computer Systems Architecture - Micronet International College

Memory

Key Differences Between SRAM and DRAM. SRAM is an on-chip memory whose access time is small while DRAM is an off-chip memory which has a large access time. Therefore SRAM is faster than DRAM.

26

Page 27: Computer Systems Architecture - Micronet International College

Outcome 1 27

Key Components ▸ Central Processing Unit ▸ Memory ▸ Buses ▸ Interfaces ▸ Peripherals

Page 28: Computer Systems Architecture - Micronet International College

Outcome 1

Computer Memory

28

Page 29: Computer Systems Architecture - Micronet International College

Outcome 1

Interfaces

29

Page 30: Computer Systems Architecture - Micronet International College

Interfaces

An interface is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans, and combinations of these.

30

Page 31: Computer Systems Architecture - Micronet International College

Interfaces

Some computer hardware devices, such as a touchscreen, can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system.

31

Page 32: Computer Systems Architecture - Micronet International College

Place your screenshot here

32

Types of Interfaces

1. Software

2. Hardware

Page 33: Computer Systems Architecture - Micronet International College

Interfaces

Hardware interfaces exist in many of the components, such as the various buses, storage devices, other I/O devices, etc.

33

Page 34: Computer Systems Architecture - Micronet International College

Interfaces

A hardware interface is described by the mechanical, electrical and logical signals at the interface and the protocol for sequencing them (sometimes called signaling).

34

Page 35: Computer Systems Architecture - Micronet International College

Interfaces

A software interface may refer to a wide range of different types of interface at different "levels": an operating system may interface with pieces of hardware.

35

Page 36: Computer Systems Architecture - Micronet International College

Interfaces

Applications or programs running on the operating system may need to interact via data streams, filters, and pipelines; and in object oriented programs, objects within an application may need to interact via methods.

36

Page 37: Computer Systems Architecture - Micronet International College

Outcome 1

CPU Clock

37

Page 38: Computer Systems Architecture - Micronet International College

Clock Speed

Clock speed is the rate at which a processor can complete a processing cycle. It is typically measured in megahertz or gigahertz.

38

Page 39: Computer Systems Architecture - Micronet International College

Clock Speed

One megahertz is equal to one million cycles per second, while one gigahertz equals one billion cycles per second. This means a 1.8 GHz processor has twice the clock speed of a 900 MHz processor.

39

Page 40: Computer Systems Architecture - Micronet International College

Outcome 1

System Buses

40

Page 41: Computer Systems Architecture - Micronet International College

System Buses

The system bus is a pathway composed of cables and connectors used to carry data between a computer microprocessor and the main memory.

41

Page 42: Computer Systems Architecture - Micronet International College

System Buses

The bus provides a communication path for the data and control signals moving between the major components of the computer system.

42

Page 43: Computer Systems Architecture - Micronet International College

System Buses

The system bus works by combining the functions of the three main buses: namely, the data, address and control buses. Each of the three buses has its separate characteristics and responsibilities.

43

Page 44: Computer Systems Architecture - Micronet International College

System Buses

The system bus connects the CPU with the main memory and, in some systems, with the level 2 (L2) cache.

44

Page 45: Computer Systems Architecture - Micronet International College

System Buses

Other buses, such as the IO buses, branch off from the system bus to provide a communication channel between the CPU and the other peripherals.

45

Page 46: Computer Systems Architecture - Micronet International College

System Buses

Control Bus The control bus carries the control, timing and coordination signals to manage the various functions across the system.

46

Page 47: Computer Systems Architecture - Micronet International College

Clock Speed

Address Bus The address bus is used to specify memory locations for the data being transferred.

47

Page 48: Computer Systems Architecture - Micronet International College

Clock Speed

Data Bus The data bus, which is a bidirectional path, carries the actual data between the processor, the memory and the peripherals.

48

Page 49: Computer Systems Architecture - Micronet International College

Computer Memory

Place your screenshot here

49

1. Volatile 2. Non

Volatile

Page 50: Computer Systems Architecture - Micronet International College

Types of Memory

Memory Cache

50

Primary/Main Memory

Secondary Memory

Page 51: Computer Systems Architecture - Micronet International College

Place your screenshot here

51

Cache Memory

Page 52: Computer Systems Architecture - Micronet International College

Memory – Cache Memory

Cache Memory Cache memory is a very high speed semiconductor memory which can speed up the CPU. It acts as a buffer between the CPU and the main memory.

52

Page 53: Computer Systems Architecture - Micronet International College

Memory – Cache Memory Cache Memory It is used to hold those parts of data and program which are most frequently used by the CPU. The parts of data and programs are transferred from the disk to cache memory by the operating system, from where the CPU can access them.

53

Page 54: Computer Systems Architecture - Micronet International College

Memory – Cache Memory

The advantages of cache memory ▸ Cache memory is faster than main memory. ▸ It consumes less access time as compared to main memory. ▸ It stores the program that can be executed within a short period of time. ▸ It stores data for temporary use.

54

Page 55: Computer Systems Architecture - Micronet International College

Memory – Cache Memory

The disadvantages of cache memory ▸ Cache memory has limited capacity. ▸ It is very expensive.

55

Page 56: Computer Systems Architecture - Micronet International College

Place your screenshot here

56

Main Memory

Page 57: Computer Systems Architecture - Micronet International College

Memory – Main Memory

Primary memory holds only those data and instructions on which the computer is currently working. It has a limited capacity and data is lost when power is switched off.

57

Page 58: Computer Systems Architecture - Micronet International College

Memory – Main Memory

It is generally made up of semiconductor device. These memories are not as fast as registers. The data and instruction required to be processed resides in the main memory.

58

Page 59: Computer Systems Architecture - Micronet International College

Memory – Main Memory

Characteristics of Main Memory ▸ These are semiconductor memories. ▸ It is known as the main memory. ▸ Usually volatile memory. ▸ Data is lost in case power is switched off. ▸ It is the working memory of the computer. ▸ Faster than secondary memories. ▸ A computer cannot run without the primary

memory.

59

Page 60: Computer Systems Architecture - Micronet International College

Memory – Secondary Memory

This type of memory is also known as external memory or non-volatile. It is slower than the main memory. These are used for storing data/information permanently.

60

Page 61: Computer Systems Architecture - Micronet International College

Memory – Secondary Memory

CPU directly does not access these memories, instead they are accessed via input-output routines. The contents of secondary memories are first transferred to the main memory, and then the CPU can access it. For example, disk, CD-ROM, DVD, etc.

61

Page 62: Computer Systems Architecture - Micronet International College

Memory – Secondary Memory

Characteristics of Secondary Memory ▸ These are magnetic and optical memories. ▸ It is known as the backup memory. ▸ It is a non-volatile memory. ▸ Data is permanently stored even if power is switched

off. ▸ It is used for storage of data in a computer. ▸ Computer may run without the secondary memory. ▸ Slower than primary memories.

62

Page 63: Computer Systems Architecture - Micronet International College

Place your screenshot here

63

Computer Processor

Page 64: Computer Systems Architecture - Micronet International College

Computer Processor

The computer processor is referred as the brain of the computer systems.

64

Page 65: Computer Systems Architecture - Micronet International College

Computer Processor

The computer processor is referred as the brain of the computer systems.

65

Page 66: Computer Systems Architecture - Micronet International College

Processor – Interrupt vs Polling

VS. Interrupt Polling

66

Page 67: Computer Systems Architecture - Micronet International College

Processor – Interrupt vs Polling

Interrupt and Polling are the two ways to handle the events generated by the devices that can happen at any moment while CPU is busy in executing another process.

67

Page 68: Computer Systems Architecture - Micronet International College

Processor – Interrupt vs Polling

Polling and Interrupt let CPU stop what it is currently doing and respond to the more important task. Polling and Interrupt are different from each other in many aspects.

68

Page 69: Computer Systems Architecture - Micronet International College

Processor – Interrupt vs Polling

But the basic point that distinguishes Polling and Interrupt is that in polling CPU keeps on checking I/O devices at regular interval whether it needs CPU service whereas, in interrupt, the I/O device interrupts the CPU and tell CPU that it need CPU service.

69

Page 70: Computer Systems Architecture - Micronet International College

Processor – Interrupt

An interrupt is a hardware mechanism that enables CPU to detect that a device needs its attention. The CPU has a wire interrupt-request line which is checked by CPU after execution of every single instruction.

70

Page 71: Computer Systems Architecture - Micronet International College

Processor – Interrupt

When CPU senses an interrupt signal on the interrupt-request line, CPU stops its currently executing task and respond to the interrupt send by I/O device by passing the control to interrupt handler. The interrupt handler resolves the interrupt by servicing the device.

71

Page 72: Computer Systems Architecture - Micronet International College

Processor – Polling

As we have seen in interrupts, the input from I/O device can arrive at any moment requesting the CPU to process it. Polling is a protocol that notifies CPU that a device needs its attention.

72

Page 73: Computer Systems Architecture - Micronet International College

Processor – Polling

Unlike in interrupt, where device tells CPU that it needs CPU processing, in polling CPU keeps asking the I/O device whether it needs CPU processing.

73

Page 74: Computer Systems Architecture - Micronet International College

Processor – Key Differences

▸ In interrupt, the device notifies the CPU that it needs servicing whereas, in polling CPU repeatedly checks whether a device needs servicing.

▸ Interrupt is a hardware mechanism as CPU has a wire,

interrupt-request line which signal that interrupt has occurred. On the other hands, Polling is a protocol that keeps checking the control bits to notify whether a device has something to execute.

74

Page 75: Computer Systems Architecture - Micronet International College

Processor – Key Differences

▸ Interrupt handler handles the interrupts generated by the devices. On the other hands, in polling, CPU services the device when they require.

▸ Interrupts are signalled by the interrupt-request line.

However, Command-ready bit indicate that the device needs servicing.

75

Page 76: Computer Systems Architecture - Micronet International College

Processor – Key Differences

▸ In interrupts, CPU is only disturbed when any device interrupts it. On the other hand, in polling, CPU waste lots of CPU cycles by repeatedly checking the command-ready bit of every device.

▸ An interrupt can occur at any instant of time whereas,

CPU keeps polling the device at the regular intervals.

76

Page 77: Computer Systems Architecture - Micronet International College

Processor – Key Differences

▸ Polling becomes inefficient when CPU keeps on polling the device and rarely finds any device ready for servicing. On the other hands, interrupts become inefficient when the devices keep on interrupting the CPU processing repeatedly.

77

Page 78: Computer Systems Architecture - Micronet International College

Place your screenshot here

78

CPU Architecture

Page 79: Computer Systems Architecture - Micronet International College

CPU Architecture

The terms 32-bit and 64-bit refer to the way a computer's processor (also called a CPU), handles information. The 64-bit version of Windows handles large amounts of random access memory (RAM) more effectively than a 32-bit system.

79

Page 80: Computer Systems Architecture - Micronet International College

CPU Architecture

Simply put, a 64-bit processor is more capable than a 32-bit processor, because it can handle more data at once. A 64-bit processor is capable of storing more computational values, including memory addresses, which means it’s able to access over four billion times the physical memory of a 32-bit processor.

80

Page 81: Computer Systems Architecture - Micronet International College

CPU Architecture 81

Page 82: Computer Systems Architecture - Micronet International College

Place your screenshot here

82

Machine Code

Page 83: Computer Systems Architecture - Micronet International College

Low Level Language

Low-level languages are designed to operate and handle the entire hardware and instructions set architecture of a computer directly.

83

Page 84: Computer Systems Architecture - Micronet International College

Low Level Language

Low-level languages are considered to be closer to computers. In other words, their prime function is to operate, manage and manipulate the computing hardware and components.

84

Page 85: Computer Systems Architecture - Micronet International College

Low Level Language

Programs and applications written in a low-level language are directly executable on the computing hardware without any interpretation or translation. Example of Low Level Languages

1. Machine Code 2. Assembly Programming

85

Page 86: Computer Systems Architecture - Micronet International College

Machine Code

A computer programming language consisting of binary or hexadecimal instructions which a computer can respond to directly.

86

Page 87: Computer Systems Architecture - Micronet International College

Assembly Language

An assembly language often abbreviated asm, is any low-level programming language in which there is a very strong correspondence between the program's statements and the architecture's machine code instructions

87

Page 88: Computer Systems Architecture - Micronet International College

Assembler

An assembler is a type of computer program that interprets software programs written in assembly language into machine language, code and instructions that can be executed by a computer.

88

Page 89: Computer Systems Architecture - Micronet International College

Assembler

An assembler is sometimes referred to as the compiler of assembly language. It also provides the services of an interpreter.

89

Page 90: Computer Systems Architecture - Micronet International College

Place your screenshot here

90

Fetch Execute Cycle

Page 91: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The Fetch-Decode-Execute cycle of a computer is the process by which a computer: 1. Fetches a program instruction from its memory, 2. Determines what the instruction wants to do, 3. Carries out those actions.

91

Page 92: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

This cycle is repeated continuously by the central processing unit (CPU), from boot up to when the computer is shut down. In modern computers this means completing the cycle billions of times a second! Without it nothing would be able to be calculated.

92

Page 93: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The circuits used in the CPU during the cycle are:

1. Program Counter (PC) 2. Memory Address Register (MAR) 3. Memory Buffer Register (MBR) 4. Instruction register (IR) 5. General Purpose Register

93

Page 94: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

Program Counter (PC) An incrementing counter that keeps track of the memory address of which instruction is to be executed next.

94

Page 95: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

Memory Address Register (MAR) The address in main memory that is currently being read or written

95

Page 96: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

Memory Buffer Register (MBR) A two-way register that holds data fetched from memory (and ready for the CPU to process) or data waiting to be stored in memory

96

Page 97: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

Instruction register (IR) A temporary holding ground for the instruction that has just been fetched from memory

97

Page 98: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The contents of the Program Counter, the address of the next instruction to be executed, is placed into the Memory Address Register

98

Page 99: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The contents of the Program Counter, the address of the next instruction to be executed, is placed into the Memory Address Register

99

Page 100: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The address is sent from the MAR along the address bus to the Main Memory. The instruction at that address is found and returned along the data bus to the Memory Buffer Register. At the same time the contents of the Program Counter is increased by 1, to reference the next instruction to be executed.

100

Page 101: Computer Systems Architecture - Micronet International College

Fetch-Decode-Execute cycle

The MBR loads the Current Instruction Register with the instruction to be executed. The instruction is decoded and executed using the ALU if necessary. The Cycle starts again!

101

Page 102: Computer Systems Architecture - Micronet International College

Place your screenshot here

102

Processor Architecture

Page 103: Computer Systems Architecture - Micronet International College

RISC and CISC

The architecture of the Central Processing Unit (CPU) operates the capacity to function from “Instruction Set Architecture” to where it was designed. The architectural design of the CPU is Reduced instruction set computing (RISC) and Complex instruction set computing (CISC).

103

Page 104: Computer Systems Architecture - Micronet International College

RISC

What is RISC? A reduced instruction set computer is a computer which only uses simple commands that can be divided into several instructions which achieve low-level operation within a single CLK cycle, as its name proposes “Reduced Instruction Set”.

104

Page 105: Computer Systems Architecture - Micronet International College

RISC

This is small or reduced set of instructions. Here, every instruction is expected to attain very small jobs. In this machine, the instruction sets are modest and simple, which help in comprising more complex commands.

105

Page 106: Computer Systems Architecture - Micronet International College

RISC

Each instruction is of the similar length; these are wound together to get compound tasks done in a single operation. Most commands are completed in one machine cycle. This pipelining is a crucial technique used to speed up RISC machines.

106

Page 107: Computer Systems Architecture - Micronet International College

CISC

What is CISC? A complex instruction set computer is a computer where single instructions can perform numerous low-level operations like a load from memory, an arithmetic operation, and a memory store or are accomplished by multi-step processes or addressing modes in single instructions, as its name proposes “Complex Instruction Set ”.

107

Page 108: Computer Systems Architecture - Micronet International College

CISC

CISC Architecture The term CISC stands for ‘’Complex Instruction Set Computer’’. It is a CPU design plan based on single commands, which are skilled in executing multi-step operations.

108

Page 109: Computer Systems Architecture - Micronet International College

CISC

CISC computers have small programs. It has a huge number of compound instructions, which takes a long time to perform. Here, a single set of instruction is protected in several steps; each instruction set has additional than 300 separate instructions. Maximum instructions are finished in two to ten machine cycles. In CISC, instruction pipelining is not easily implemented.

109

Page 110: Computer Systems Architecture - Micronet International College

RISC and CISC 110

Page 111: Computer Systems Architecture - Micronet International College

111

Any Questions?

Page 112: Computer Systems Architecture - Micronet International College

References: 1. Definitions, N. and Hope, C. (2017). What is Network Media?. [online]

Computerhope.com. Available at: https://www.computerhope.com/jargon/n/network-media.htm

112