Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Informatics 1.Lecture 1: Hardware
using Ferenc Wettl’sand Kristóf Kovács’s material
Budapest University of Technology and Economics
2019-09-09
Gábor Borbély Informatics 1. Lecture 1: 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 Sage
Gábor Borbély Informatics 1. Lecture 1: Hardware
Basic concepts
HardwareAny physical components in a computerA computer can execute programs written in a binary language.
SoftwarePrograms written in a language understood by the computerData required for the execution of the programs
Gábor Borbély Informatics 1. Lecture 1: Hardware
Hardware
Main components of acomputer:
1 Motherboard2 Processor: Central
Processing Unit (CPU)3 Memory: Random-Access
Memory (RAM)4 Mass storage (HDD,
SSD)5 Input6 Output
Main types of computers:Server,Personal computer (PC),Laptop, Notebook,Tablet,Smart phone, etc.
1
23
4 5 6
Gábor Borbély Informatics 1. Lecture 1: Hardware
Processor
FunctionExecutes basic operations (addition,subtraction, storage, etc.)During the execution of a program theCPU (Central Processing Unit) executesthese bacis operations in the order givenby the program with the values given bythe program
Interesting factsBuilding a CPU factory is one of themost expensive things in the worldMore and more features are crammedinto a CPU, for example modernprocessors have integrated graphicsprocessors (APU)
Gábor Borbély Informatics 1. Lecture 1: Hardware
Processor specifics
Clock speedNumber of (basic) operations per secondExample: 4GHz
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 smartphone CPUs is theirheat generationBigger computers can have better cooling, hence strongerCPUs
Gábor Borbély Informatics 1. Lecture 1: 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).
operation cost
cheap integer addition, subtraction, multiplication 1-5
medium integer division, modulo (except with power of 2) ~10
expensive division, sqrt, sin, cos, tan, asin, acos, atan ~100
FLOPSfloating-point operations per secondreal arithmetic operations per secondTheoretically
number of cores × clock speed × FLOcycle
Desktop CPUs: 10-100 Giga FLOPSGábor Borbély Informatics 1. Lecture 1: Hardware
Memory (RAM)
FunctionTemporary data storageThe processor reads data andprograms from the memoryrandom access, as opposed tosequential
Interesting factsA computer with 2 sticks of 2GBof RAM is faster than the onewith 1 stick of 4GB of RAM.It is a misbelief that the speed ofa computer is proportional to thesize of its memory.
Gábor Borbély Informatics 1. Lecture 1: 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 = 1125899906842624220 = 1048576 260 = 1152921504606846976230 = 1073741824 270 = 1180591620717411303424240 = 1099511627776 280 = 1208925819614629174706176
Gábor Borbély Informatics 1. Lecture 1: 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.
Gábor Borbély Informatics 1. Lecture 1: Hardware
Motherboard
FunctionActs as a link between the othercomponentsMay contain an integratedgraphics, network and/or soundcard
SpecificsProcessor socketMemory socketMass storage plug typeNumber of other plugs (like USB)
Interesting factsIn theory, it is possible that a lowquality motherboard slows downa computer, if the data transferrate between the components isslow.
Gábor Borbély Informatics 1. Lecture 1: Hardware
Mass storage
FunctionLong term data storage (files)
SpecificsStorage sizeType (SSD, HDD)Speed of read/write
Interesting factsIn 1956 16GB (which can be store in amicroSD nowadays) could only fit inmass storage structure the size of a 10story building.In hungarian some people still call massstorage devices winchesters, in 1973 thiswas the codename of a widely used massstorage device.
Gábor Borbély Informatics 1. Lecture 1: Hardware
SSD/HDDHDD (Hard Disk Drive)
A spinning, magnetized disk storesthe dataFragile, agesSpeed (example: 7200rpm –revolutions per minute)Best for sequantial data access
SSD (Solid-State Drive)Works in a similar manner as RAMSignificantly faster than HDDages with usageStill a lot more expensive than HDDIf our computer has some SSDstorage it is worth to store theoperating system there.
Gábor Borbély Informatics 1. Lecture 1: 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.
Gábor Borbély Informatics 1. Lecture 1: 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?
Gábor Borbély Informatics 1. Lecture 1: Hardware