Primary & Secondary Memory, Lecture notes of Computer Science

Introduction to primary and secondary memory of Computers

Typology: Lecture notes

2020/2021

Uploaded on 05/26/2021

syed-ali-raza-1
syed-ali-raza-1 🇵🇰

5

(1)

5 documents

1 / 27

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Fundamentals: Pradeep K. Sinha &
Priti
Sinha
Computer Fundamentals: Pradeep K. Sinha &
Priti
Sinha
Slide 1/27
Chapter 7: Processor and Memory
Ref Page
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Primary & Secondary Memory and more Lecture notes Computer Science in PDF only on Docsity!

  • Ref Page Chapter 7: Processor and Memory Slide 1/

Ref Page Chapter 7: Processor and Memory Slide 2/

In this chapter you will learn about:

§ Internal structure of processor

§ Memory structure

§ Determining the speed of a processor

§ Different types of processors available

§ Determining the capacity of a memory

§ Different types of memory available

§ Several other terms related to the processor and

main memory of a computer system

Learning Objectives Learning Objectives

Ref Page Chapter 7: Processor and Memory Slide 4/

§ The brain of a computer system

§ Performs all major calculations and comparisons

§ Activates and controls the operations of other units of a

computer system

§ Two basic components are

§ Control Unit (CU)

§ Arithmetic Logic Unit (ALU)

§ No other single component of a computer determines

its overall performance as much as the CPU

Central Processing Unit (CPU) Central Processing Unit (CPU)

Ref Page Chapter 7: Processor and Memory Slide 5/

§ One of the two basic components of CPU

§ Acts as the central nervous system of a computer

system

§ Selects and interprets program instructions, and

coordinates execution

§ Has some special purpose registers and a decoder to

perform these activities

Control Unit (CU) Control Unit (CU)

Ref Page Chapter 7: Processor and Memory Slide 7/

§ CPU has built-in ability to execute a particular set of machine instructions, called its instruction set § Most CPUs have 200 or more instructions (such as add, subtract, compare, etc.) in their instruction set § CPUs made by different manufacturers have different instruction sets § Manufacturers tend to group their CPUs into “families” having similar instruction sets § New CPU whose instruction set includes instruction set of its predecessor CPU is said to be backward compatible with its predecessor

Instruction Set Instruction Set

Ref Page Chapter 7: Processor and Memory Slide 8/

§ Special memory units, called registers, are used to

hold information on a temporary basis as the

instructions are interpreted and executed by the CPU

§ Registers are part of the CPU (not main memory) of a

computer

§ The length of a register, sometimes called its word

size , equals the number of bits it can store

§ With all other parameters being the same, a CPU with

32-bit registers can process data twice larger than

one with 16-bit registers

Registers Registers

Ref Page Chapter 7: Processor and Memory Slide 10/

§ Computer has a built-in system clock that emits millions of regularly spaced electric pulses per second (known as clock cycles) § It takes one cycle to perform a basic operation, such as moving a byte of data from one memory location to another § Normally, several clock cycles are required to fetch, decode, and execute a single program instruction § Hence, shorter the clock cycle, faster the processor § Clock speed (number of clock cycles per second) is measured in Megahertz (10^6 cycles/sec) or Gigahertz (10^9 cycles/sec)

Processor Speed Processor Speed

Ref Page Chapter 7: Processor and Memory Slide 11/

Mostly used in workstations

§ Small instruction set § Fixed-length instructions § Reduced references to memory to retrieve operands

RISC (Reduced Instruction Set Computer)

Mostly used in personal computers

§ Large instruction set § Variable-length instructions § Variety of addressing modes § Complex & expensive to produce

CISC (Complex Instruction Set Computer)

Type of Features Usage Architecture

Types of Processor Types of Processor

(Continued on next slide)

Ref Page Chapter 7: Processor and Memory Slide 13/

Mostly used in high-end servers and workstations

§ Processor chip has multiple cooler-running, more energy- efficient processing cores § Improve overall performance by handling more work in parallel § can share architectural components, such as memory elements and memory management

Multi-Core Processor

Type of Features Usage Architecture

Types of Processor Types of Processor

(Continued from previous slide..)

Ref Page Chapter 7: Processor and Memory Slide 14/

§ Every computer has a temporary storage built into

the computer hardware

§ It stores instructions and data of a program mainly

when the program is being executed by the CPU.

§ This temporary storage is known as main memory,

primary storage, or simply memory.

§ Physically, it consists of some chips either on the

motherboard or on a small circuit board attached to

the motherboard of a computer

§ It has random access property.

§ It is volatile.

Main Memory Main Memory

Ref Page Chapter 7: Processor and Memory Slide 16/

Addresses of a memory

The words of a memory (total N words)

N-

N-1 Each word contains the same number of bits = Bit 1 Bit 2 word length

Main Memory Organization Main Memory Organization

(Continued on next slide)

Ref Page Chapter 7: Processor and Memory Slide 17/

§ Machines having smaller word-length are slower in

operation than machines having larger word-length

§ A write to a memory location is destructive to its previous

contents

§ A read from a memory location is non-destructive to its

previous contents

Main Memory Organization Main Memory Organization

(Continued from previous slide..)

Ref Page Chapter 7: Processor and Memory Slide 19/

B O M B A Y

0025 0026

0027

0028

0029 0030

0031

4096

D

E

L

H

I

0051

0052

0053 0054

0055

0056

4096

§ Each memory location can store only a single character

§ Slower in speed of calculation than fixed world-length memory

§ Used in small business computers for optimizing the use of storage space

Note: With memory becoming cheaper and larger day-by-day, most modern computers employ fixed-word-length memory organization

Variable Word-length Memory Variable Word-length Memory

Address Numbers

Address Numbers

Ref Page Chapter 7: Processor and Memory Slide 20/

§ Memory capacity of a computer is equal to the number

of bytes that can be stored in its primary storage

§ Its units are:

Kilobytes (KB) : 1024 (2^10 ) bytes

Megabytes (MB) : 1,048,576 (2^20 ) bytes

Gigabytes (GB) : 1,073,741824 (2^30 ) bytes

Memory Capacity Memory Capacity