Τμήμα Ξένων Γλωσσών, Μετάφρασης και Διερμηνείας ΠΛΗΡΟΦΟΡΙΚΗ (COM OMPU PUTE TER R SCIENC IENCE) E) FACTORS AFFECTING PROCESSING SPEED ΠΡΟΓΡΑΜΜΑ ΠΡΟΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ ΔΙΔΑΣΚΟΝΤΕΣ : Κωνσταντίνος Οικονόμου, Αν. Καθηγητής Γεώργιος Κουφουδάκης, Διδάκτορας Αθανάσιος Τσίπης, Υπ. Διδάκτορας Αστέριος Παπαμιχαήλ, Μεταπτυχιακός Φοιτητής Κέρκυρα, 2019-2020
Factors Affecting Processing Speed ■ CPU’s design determines its basic speed ■ However, other factors play significant role – Memory – Registers – Virtual Memory – Clock Speed – Cache Memory
Memory ■ CPU requires millions (or even trillions) of bytes of space for reading /writing programs ■ This area is called memory ■ It consists of chips either on the motherboard or on a small circuit board attached to the motherboard ■ It allows CPU to store and retrieve data quickly ■ Two types of built-in memory: – Permanent and nonpermanent – Nonvolatile and volatile
Nonvolatile Memory ■ Holds data even when computer in unplugged ■ Permanent store of data ( “burning in the data” ) ■ Usually data is only read and used – Read Only Memory (ROM) ■ Chips that cannot be changed are called programmable read only memory (PROM) ■ PROM chips contain the instructions that power devices ■ ROM contains a set of start-up instructions called basic input output system (BIOS) ■ BIOS also contains routines for checking: – The proper function of the system – All expected hardware devices are present – These are called power on self test (POST)
Flash Memory ■ Flash memory is a special type of nonvolatile memory ■ Often used in portable devices (e.g. digital cameras, MP3 players, game consoles) ■ Switches store the binary values that make up the data – E.g. on camera with flash card – Picture is stored on the card – It is stored by turning millions of tiny switches on and off
Volatile Memory ■ Requires power to store data ■ In computer it is called random access memory (RAM) ■ When we refer to memory, we usually mean RAM ■ Holds data while they are in use ■ RAM consists of chips on a small circuit board ■ Single in-line memory modules (SIMMs) Desktop Computers ■ Dual in-line memory modules (DIMMs) ■ Small outline DIMM (SO-DIMM) ➔ Laptop Computers
RAM ■ It is designed to be accessible by the CPU or programs ■ Random: any portion of RAM can be accessed at any time ➔ Very fast ■ CPU uses memory addresses to store and retrieve pieces of data ■ A memory address is a number that indicates a location on the memory chips ■ They start at zero and go up to one less than the number of bytes of memory available ■ RAMs can be found in various places in a computer system, e.g.: – Most video and sound cards have their own built-in RAM – The same goes for various types of printers – And so on…
Memory and Computing Power ■ The amount of RAM affects significantly the computer’s power ■ More RAM ➔ Use of bigger and more powerful programs ■ More RAM ➔ Access to bigger data files ■ More RAM ➔ Increase in computer speed ■ More RAM ➔ Greater amount of program fits into memory ➔ The program runs faster
Registers ■ Number of bits a processor can handle ■ The size of registers is called word size ■ It indicates the amount of data a computer processor can work with at any given moment ■ The bigger the word size the more quickly the computer can process data ■ First PC could hold 2 bytes (16-bit processor) ■ Today most common 32-bit processors and 64-bit processors ■ The terminology refers to the size of the registers ■ If all other factors are kept stable then: – 64-bit processor twice as fast as a 32-bit processor
Swapping (or Paging) ■ When computer needs access to program it can unload nonessential parts from RAM to disk ■ This process is called swap out ■ Then the computer loads the program code or data it needs in RAM ■ This process is the opposite and is called swap in ■ RAM is limited! ■ Effective method for managing a limited amount of memory ■ Disadvantage: The computer’s performance is slower – CPU, memory, and disk are continuously occupied with swapping process ■ Swapping unused contents of RAM to the hard disk is known as virtual memory
Virtual Memory ■ The goal is to make the program think that more memory exists (than possible) ■ Virtual Memory Manager (VMM) creates a file in hard disk ■ The file is called swap file (or paging file) and it emulates RAM ■ Allows to store any extra data that can’t be stored in RAM at current moment ■ Notice! Data are not usable when in the swap file ■ Data is usable by program only in RAM
RAM and Speed
Computer’s Internal Clock Not to keep time of day! ■ Every microcomputer has a system clock ■ The clock is driven by a quartz crystal ■ When electricity is applied, the molecules of the crystal vibrate at a rapid rate that never changes ■ The speed of the vibrations is determined by the thickness of the crystal ■ The computer uses the vibrations to time its processing operations ■ This rate is measured in Hertz (Hz) – clock cycles per second – 800 MHz → the clock “ticks” 800 million times per second – 3.6 GHz → the clock “ticks” 3.6 billion times per second ■ Clock cycle: a single tick or the time it takes to turn a transistor off and back on again ■ A processor can execute an instruction in a given number of clock cycles ■ Increase in system’s clock speed means increase in processing power (the processor can carry out more instructions per second)
Cache Memory ■ Moving data between RAM and CPU’s registers is extremely time -consuming ■ RAM is much slower than CPU ■ Solution! Include Cache Memory (pronounced as Cash Memory) in CPU Cache ■ It is similar to RAM but much faster compared to normal memory ■ Stores the most recently used main memory data ■ How does it work? 1. When CPU requires to read data from RAM it first checks for it in Cache 2. If the data is not there, it searches for it in RAM 3. RAM sends the data to CPU and stores a copy in Cache 4. The next time CPU needs the data, it finds it in Cache ■ CPU using Cache saves the time needed to load data from RAM
Cache Memory in Use
Levels of Cache Memory ■ Cache is present in several places in computer – e.g. most hard drives and network cards have cache to speed up the data access ■ CPUs have Cache built into them – Level-1 (L1) Cache ■ To add even more speed modern CPUs have an additional Cache – Level-2 (L2) Cache ■ A third Cache is added on motherboard (motherboard resident) – Level-3 (L3) Cache ■ L3 Cache found on very-high-end computers ■ L1, L2 and L3 speed up the CPU in different ways – L1 Cache: holds instructions that have recently run – L2 Cache: holds potential upcoming instructions – L3 Cache: holds many of the possible instructions
Literature ■ Peter Norton, Introduction to Computers, Sixth Edition, pp. 131-133, 136, 138-139 ■ Intro ch 05_a Peter Norton http:// ://www ww.slide .slidesh share.n are.net/s t/sam1 am178 7896/i 96/intr ntro-ch ch-05a 05a-peter-nor norton on
Recommend
More recommend