22
Informatics 1. Lecture 1: Hardware Kristóf Kovács, Ferenc Wettl Budapest University of Technology and Economics 2017-09-04 Kovács Kristóf Informatics 1. Lecture 1: Hardware

Informatics1. Lecture1: Hardware

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Informatics1. Lecture1: Hardware

Informatics 1.Lecture 1: Hardware

Kristóf Kovács, Ferenc Wettl

Budapest University of Technology and Economics

2017-09-04

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 2: Informatics1. Lecture1: Hardware

Requirements to pass

3 written examsweek 5, 9, 14each examination is worth 20%individually need 50% on each examination2 exams can be repeated

weekly homework, 30%, min 50%10 "pop quizzes"

at the start of each practical class, 1-2 minuteseach of them is worth 1%50% required to pass (not individually)

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 3: Informatics1. Lecture1: Hardware

Curriculum

1 Hardware2 Operating system, programs, file structure3 Representing data in a computer4 Internet, network

5 HTML, CSS6 TEX, LATEX7 Making presentations, beamer8 Graphics, TikZ

9 Numerical mathematics and computer algebra systems10 Variable, if branching, function call, recursion11 Octave12 Sage13 Mathematica

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 4: Informatics1. Lecture1: Hardware

Basic concepts

HardwareA computer is a sum of its components.A computer can execute programs written in a language that itcan understand.

SoftwarePrograms written in a language understood by the computerData required for the execution of the program

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 5: Informatics1. Lecture1: Hardware

Hardware

Main components of acomputer:

MotherboardProcessor (CPU)Memory (RAM)Mass storage (HDD, SSD)Periphery (Input, Output)

Main types of computers:Server,Personal computer (PC),Laptop, Notebook,Tablet,Smart phone, etc.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 6: Informatics1. Lecture1: Hardware

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 7: Informatics1. Lecture1: Hardware

Processor

FunctionExecutes basic operations(addition, subtraction, storage,etc.)During the execution of aprogram the CPU (CentralProcessing Unit) executes thesebacis operations in the ordergiven by the program with thevalues given by the program

Interesting factsBuilding a CPU factory is one ofthe most expensive things in theworldMore and more features arecrammed into a CPU, forexample modern processors haveintegrated graphics processors aswell

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 8: Informatics1. Lecture1: Hardware

Processor specifics

Clock speedNumber of (basic) operations per secondExample: 2.5GHz

Number of cores (parallel computations)Modern CPUs have multiple coresA well written program can make use of more than just onecoreIntel has a technology called virtual core: the CPUs thatfeature this technology (example: i3, i7) double their numberof parallel operations by making use of a virtual core insideevery core

Heat generationThe main thing holding back the developement of CPUs istheir heat generationThere are processors that are designed to be used withoutcooling (example: CPUs in mobile phonesOther ones require significant cooling to function

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 9: Informatics1. Lecture1: Hardware

Operation costs

Lets say that addition has a computation cost of 1. Then the costof other operations is shown in the table (these are just estimates,they vary based on processor, manufacturer, etc.).

operation cost

cheapaddition, subtraction, comparison 1

absolute value 2multiplication 4

mediumdivision (except with power of 2) 10

remainder (modulo) 10

expensive

power of e 50sin, cos, tan 60

asin, acos, atan 80power 100root varies

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 10: Informatics1. Lecture1: Hardware

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 11: Informatics1. Lecture1: Hardware

Memory (RAM)

FunctionTemporary data storageThe processor reads data and programsfrom the memory

Interesting factsA computer with 2 sticks of 2GB ofRAM is faster than the one with 1 stickof 4GB of RAM.It is a misbelief that the speed of acomputer is proportional to the size ofits memory.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 12: Informatics1. Lecture1: Hardware

Units of measurement

SI prefix Old usage Binary prefix

Notation Value Value Notation ValuekB KB (kilobyte) 10001 = 103 10241 = 210 KiB (kibibyte) 210

MB (megabyte) 10002 = 106 10242 = 220 MiB (mebibyte) 220

GB (gigabyte) 10003 = 109 10243 = 230 GiB (gibibyte) 230

TB (terabyte) 10004 = 1012 10244 = 240 TiB (tebibyte) 240

PB (petabyte) 10005 = 1015 10245 = 250 PiB (pebibyte) 250

EB (exabyte) 10006 = 1018 10246 = 260 EiB (exbibyte) 260

ZB (zettabyte) 10007 = 1021 10247 = 270 ZiB (zebibyte) 270

YB (yottabyte) 10008 = 1024 10248 = 280 YiB (yobibyte) 280

210 = 1024 250 = 1125899906842624

220 = 1048576 260 = 1152921504606846976

230 = 1073741824 270 = 1180591620717411303424

240 = 1099511627776 280 = 1208925819614629174706176

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 13: Informatics1. Lecture1: Hardware

Memory specifics

Clock speedThe performance of the memory is mainly influenced by thespeed of reading and writing data from and to the memory.The clock speed represents this read/write speed

Capacity (storage space)The amount of data the memory can storeMost operating systems use virtual memory, this feature uses apart of the mass storage as memory in case the real memoryfills up. This is significantly slower, even for an SSD.When the memory fills up the operating system tries to swapthe least frequently used parts of the memory to the virtualmemory (swap).This is the reason why a computer with a really strong CPUcan still slow down if it runs out of memory.

Type (socket)Motherboards have a specific RAM socket, not all types ofmemories can be placed into a specific motherboard.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 14: Informatics1. Lecture1: Hardware

Memory sockets

Nowadays every type of motherboard uses the DDR3 socket.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 15: Informatics1. Lecture1: Hardware

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 16: Informatics1. Lecture1: Hardware

Motherboard

FunctionActs as a link between the othercomponentsMay contain an integrated graphics,network and/or sound card

SpecificsProcessor socketMemory socketMass storage plug typeNumber of other plugs (like USB)

Interesting factsIn theory it is possible that a lowquality motherboard slows down acomputer, for example if the datatransfer rate between the processorand the memory is slow, then even ahigh end CPU and memory could feelslow.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 17: Informatics1. Lecture1: Hardware

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 18: Informatics1. Lecture1: Hardware

Mass storage

FunctionLong term data storage

SpecificsStorage sizeType (SSD, HDD)Speed of read/write operations

Interesting factsIn 1956 16GB (which can bestore in a microSD nowadays)could only fit in mass storagestructure the size of a 10 storybuilding.In hungarian some people stillcall mass storage deviceswinchesters, in 1973 this was thecodename of a widely used massstorage device.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 19: Informatics1. Lecture1: Hardware

SSD/HDD

HDD (Hard Disk Drive)A spinning disk stores the dataFragile, agesSpeed (example: 7200rpm –revolutions per minute)

SSD (Solid-State Drive)Works in a similar manner as RAMSignificantly faster than HDDDoes not age, instead it wears downdue to usageStill a lot more expensive than HDDIf our computer has some SSDstorage it is worth to store theoperating system there.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 20: Informatics1. Lecture1: Hardware

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 21: Informatics1. Lecture1: Hardware

Peripheries

Examples of input devicesMouseKeyboardTouchpadMotion captureMicrophone

Examples of output devicesMonitorPrinterSpeakers

Interesting factsThe introduction of USB (UniversalSerial Bus) simplified the usage andmanufacturing of the differentperipheries. For example before theUSB, mouses and keyboards haddifferent plugs.

Kovács Kristóf Informatics 1. Lecture 1: Hardware

Page 22: Informatics1. Lecture1: Hardware

Questions

What is the difference between the CPU, RAM and massstorage?What does it mean that a processor has more than one core,and that operations can ran in parallel.How much data does these represent: kB, MB, GB, TB, KiB,MiB, GiB, TiB?What is virtual memory and what is the swap operation?What is the difference between an HDD and an SSD?

Kovács Kristóf Informatics 1. Lecture 1: Hardware