(COM OMPU PUTE TER R SCIENC IENCE) E) PROCESSING DATA - - PowerPoint PPT Presentation

com ompu pute ter r scienc ience e
SMART_READER_LITE
LIVE PREVIEW

(COM OMPU PUTE TER R SCIENC IENCE) E) PROCESSING DATA - - PowerPoint PPT Presentation

, (COM OMPU PUTE TER R SCIENC IENCE) E) PROCESSING DATA


slide-1
SLIDE 1

ΠΛΗΡΟΦΟΡΙΚΗ (COM OMPU PUTE TER R SCIENC IENCE) E) PROCESSING DATA

Τμήμα Ξένων Γλωσσών, Μετάφρασης και Διερμηνείας

Κέρκυρα, 2019-2020

ΠΡΟΓΡΑΜΜΑ ΠΡΟΠΤΥΧΙΑΚΩΝ ΣΠΟΥΔΩΝ

ΔΙΔΑΣΚΟΝΤΕΣ: Κωνσταντίνος Οικονόμου, Αν. Καθηγητής Γεώργιος Κουφουδάκης, Διδάκτορας Αθανάσιος Τσίπης, Υπ. Διδάκτορας Αστέριος Παπαμιχαήλ, Μεταπτυχιακός Φοιτητής

slide-2
SLIDE 2

Central Processing Unit (CPU)

■ The “brain” of the computer ■ Place where data is manipulated ■ In average microprocessors, the entire CPU is a single unit ■ Today we find multi-core processors (i.e. dual-core, quad-core, six-core, octa-core, …) ■ Also we use the term many-core or massively multi-core – Example: Intel has produced a 48-core processor for research in cloud computing ■ In large computer systems (e.g. supercomputers, mainframes, etc.) multiple processing chips to handle data and tasks – It may consist of hundreds (or even thousands) of separate processor chips ■ All CPUs has at least two basic parts: – The Control Unit – The Arithmetic Logic Unit

slide-3
SLIDE 3

Control Unit (CU)

■ Manages all computer’s resources ■ The “traffic signal” directing the flow of data through the CPU and to/from other devices ■ The logical hub of the computer ■ Holds all instructions for carrying out commands ■ Instructions or Instruction Set: – List of all operations the CPU can perform – Each instruction expressed by a microcode – Microcode:

■ A series of basic directions that tell CPU how to execute more complex operations

slide-4
SLIDE 4

Arithmetic Logic Unit (ALU)

■ All data is stored as numbers ➔ Much processing involves comparing numbers or executing mathematical operations ■ Two types of operations: – Arithmetic operations

■ Addition, Subtraction, Multiplication, Division

– Logical operations

■ Comparisons: one number is equal to, greater than, less than another number ■ Every comparison has an opposite – Use of word not – Not equal to, not greater than, not less than

slide-5
SLIDE 5

All arithmetic and logical operations

slide-6
SLIDE 6

CU and ALU

■ CU performs tasks such as moving data from one place to another, e.g. from memory to storage or from memory to printer ■ When an instruction demands arithmetic of logic operation CU passes it to ALU ■ ALU performs the operations listed in instruction ■ ALU includes a group of registers ■ Registers: – high speed memory locations – Used to hold data currently being processed or used for calculation by ALU

slide-7
SLIDE 7

CU and ALU: Example

■ CU loads two numbers from memory to ALU’s registers ■ CU tells ALU to divide the two numbers (arithmetic operation)

  • r

CU tells ALU to see whether the two numbers are equal (logical operation) ■ The number/result of the above calculations is then stored in another register ■ It is then being sent out of the CPU

slide-8
SLIDE 8

Machine Cycle (1/2)

■ Each time CPU executes an instruction it takes a series of steps ■ The complete series of steps is called machine cycle ■ The machine cycle can be further broken down into – The instruction cycle – The execution cycle

slide-9
SLIDE 9

Instruction Cycle

■ At the beginning of the machine cycle ■ CPU takes two actions: – Fetching: Before CPU can execute an instruction, the CU must retrieve (or fetch) a command of data from computer’s memory – Decoding: Before a command can be executed, the CU must break down (or decode) the command into instructions corresponding to CPU’s instruction set

slide-10
SLIDE 10

Execution Cycle

■ After the step of decoding the execution may begin ■ CPU takes two actions: – Executing: when CPU executes a command, it carries out the instructions in

  • rder by converting them into microcode

– Storing: the CPU may be required to store the results of an action into memory

slide-11
SLIDE 11

Machine Cycle (2/2)

■ The process is complex ■ Nevertheless, it is accomplished at an incredible speed ■ Translation of multiple instructions every second ■ CPU is measured in millions of instructions per second (MIPS) – Newer CPUs are measured in billions of instructions per second (BIPS) – Supercomputers can perform trillions of instructions per second (TIPS)

slide-12
SLIDE 12

Machine Cycle Example

slide-13
SLIDE 13

Pipeline Processing

■ Microprocessors execute instructions rapidly ■ To speed up the process newer processors use pipelining (or pipeline processing) ■ Instruction-level parallelism within a single processor ■ The CU initiates an new machine cycle before current is over ■ Instruction executions are performed in stages: – When first instruction’s fetching stage is over it moves to the decoding stage – At that point an new instruction is fetched – Think pipeline as an assembly line

■ Each instruction is broken up in parts ■ Once on part is over it is passed to the second ■ The first step in the line is now idle ■ The pipeline feeds a new step one

■ Microprocessors may execute up to 20 instructions simultaneously

slide-14
SLIDE 14

Pipeline

Instr structi ucti

  • ns’ No.

Pi Pipeli eline ne Sta tages ges

  • In. 1

Fetch Decode Execute Store

  • In. 2

Fetch Decode Execute Store

  • In. 3

Fetch Decode Execute Store

  • In. 4

Fetch Decode Execute Store

  • In. 5

Fetch Decode Execute Store

  • In. 6

Fetch Decode Execute Store Time Step 1 2 3 4 5 6 7 8 9

slide-15
SLIDE 15

Multitasking

■ Support for running many programs / tasks (multitasking) ■ CPU performs tasks for more than one program ■ CPU creates threads ■ Thread: – One instruction from a program – Execution of one thread at one time – CPU performs multiple threads very quickly – The users thinks programs are executed at the same time ■ Newer processors (multi-core) support hyper-threading – Execution of multiple threads at the same time

slide-16
SLIDE 16

Literature

■ Peter Norton, Introduction to Computers, Sixth Edition, pp. 130 - 131 ■ 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

  • n