Computer Science 1000
-
Upload
preston-kline -
Category
Documents
-
view
20 -
download
0
description
Transcript of Computer Science 1000
![Page 1: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/1.jpg)
Computer Science 1000
Terminology
![Page 2: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/2.jpg)
The Language of Computer Science field is notorious for cryptic terms
WYSIWYG GPU flops
even recognizable terms may mean something different than you are used to
monitor boot resolution window
![Page 3: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/3.jpg)
The Language of Computer Scienceour discussions this semester may contain
new or unfamiliar termsbuilding your fluency with these terms will
help your comprehension as we progress through our topics
we will divide this discussion by topic today, we will consider hardware terms
![Page 4: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/4.jpg)
Hardware The machines, wiring, and other physical
components of a computer or other electronic system.
- Google Dictionary
in other words, the components that make up your computer
contrast this with software, which are the programs that are stored on your device
![Page 5: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/5.jpg)
Computera programmable device typically consists of a set of hardware
componentsComponent
a piece of hardware that forms part of a machine
CPU, RAM, hard drive, etc ...
![Page 6: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/6.jpg)
Component Types Internal
devices that exist in the computer "box" e.g. RAM, CPU typically plugged directly into motherboard
External devices outside of the box e.g. display, keyboard, mouse typically connected via external ports
some component types (e.g. hard drives) have both internal and external versions
![Page 7: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/7.jpg)
Computer historically, when someone said computer, it was
clear what was being referenced box, monitor, keyboard, mouse, etc ...
today, that definition has changed laptops handheld devices (e.g. smartphones) embedded chips
when we refer to a computer in this class, we'll typically be referring to desktops and laptops, unless otherwise specified
![Page 8: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/8.jpg)
Computer Organization two types of computer organization
1. Component Organizationcomputers sold as separate piecese.g. desktop (tower, keyboard, display)
2. Monolithic Organizationentire system is sold as a single unite.g. laptop, smartphone, all-in-one/iMac
![Page 9: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/9.jpg)
Computer – Disambiguiting when referring to a computer, many people will include the
display and input devices as part of the definition technically speaking, more accurate to define it as the "box"
that the components are connected to, and all components within
however, a perfect definition is not clear: laptops/iMacs have displays and inputs integrated into the
system some components (e.g. hard drives) that have traditionally been
internal are now external
we will use it in both contexts, and explicity disambiguate when it's not clear
![Page 10: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/10.jpg)
Common Computer TypesDesktop
small inexpensivemarketed for individual user
also referred to as personal computers, PCs, etc
once dominated the market, due to low cost laptops have outsold desktops for almost a decade*
*http://www.engadget.com/2005/06/04/laptops-outsell-desktops-for-the-first-time-again/
![Page 11: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/11.jpg)
Desktop some consider the term
desktop as a specific model of personal computer
a flat box that typically sits under the monitor
this is differentiated from tower models
![Page 12: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/12.jpg)
Desktopsome consider desktops to
refer specifically to personal computers running Microsoft Windows
this excludes machines running other operating systems (e.g. Linux), as well as any Apple products
![Page 13: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/13.jpg)
Desktop for our purposes, we will ignore the
previous two distinctions in other words, a desktop will refer to a
personal computer that's not a laptop or mobile device, regardless of operating system or box placement
![Page 14: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/14.jpg)
Common Computer TypesLaptop
similar to desktop, but monolithic (self-contained) design
typically more expensive than equivalent desktop
variants: notebooks netbooks
![Page 15: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/15.jpg)
Laptop Variants notebook
refers to laptops that are smaller and lighter fewer components (e.g. no integrated DVD)
typically more expensive and less powerful than laptops note: some people use the term interchangeably
netbook a smaller, inexpensive, very basic machine designed for simple tasks (document processing, internet
access)
![Page 16: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/16.jpg)
Laptop – Termunless specified, we will use laptop to refer
to all variants (notebooks, netbooks) this includes all manufacturers, including
Apple (MacBook)
![Page 17: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/17.jpg)
Componentsconsider the selection of computers at a
large retailerdozens of different modelswhat makes them unique?
answer: the componentsdifferent machines have different componentsaffect power and price
![Page 18: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/18.jpg)
Typical Componentssome components are optional, but all
computers will have some type of:CPURAMPersistant StorageMotherboard
![Page 19: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/19.jpg)
Central Processing Unit (CPU)also referred to as microprocessor,
or just processor the brain of the computer, it
executes the instructions that it is given
performs arithmetic loads and moves data in memorycontrols I/O devices
![Page 20: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/20.jpg)
CPU – Basic Operation read an instruction execute that instruction repeat for next instruction
the above is a bit of a simplification branches and jumps affect the sequence pipelining allows multiple instructions to execute
simultaneously
![Page 21: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/21.jpg)
CPU – Basic Operation read an instructionexecute that instruction repeat for next instruction
00001001000100010000101000011101000100110010100000001100001110000010010101110000
place value "17" in memory location 1
place value "29" in memory location 2
add values in loc. 1 and 2, place in loc. 3
place value "56" in memory location 4
multiply values in loc. 3 and 4, place in loc. 5
1
2
3
4
5
MemoryCPU
17
29
46
56
2576
00001001000100010000101000011101000100110010100000001100001110000010010101110000
00001001000100010000101000011101000100110010100000001100001110000010010101110000
00001001000100010000101000011101000100110010100000001100001110000010010101110000
00001001000100010000101000011101000100110010100000001100001110000010010101110000
00001001000100010000101000011101000100110010100000001100001110000010010101110000
Computer Program
![Page 22: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/22.jpg)
CPUprocessors have characteristics that define
themwe will consider some of the more well-
known characteristicsclock ratenumber of corescache
![Page 23: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/23.jpg)
CPU – Clock ratea CPU has an internal clock that cycles
("ticks") at a certain rate the rate of the clock cycle determines how
many instructions can be executed in a second
hence, the faster the clock rate, the faster a program can execute
![Page 24: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/24.jpg)
CPU – Clock Ratemeasured in Hertz (Hz)
cycles per secondclock rates for current processors: 2.0 – 4.0
GHz in other words, current processors cycle
between 2 billion and 4 billion times per second
![Page 25: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/25.jpg)
![Page 26: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/26.jpg)
CPU – Clock Ratenote that clock rate does not necessarily
indicate how many instructions can be executed in a second
instructions have varying cycle requirementspipelining allows an instruction to start before
another instruction has terminatedhowever, it is likely that your processors are
executing billions of instructions per second
![Page 27: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/27.jpg)
CPU – Coresa recent trend is to pack several CPUs onto
a single chipeach one of these CPUs is called a "core"each core can execute instructions
independentlyhence, more cores = better performance
although, may not make individual program run faster
![Page 28: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/28.jpg)
CPU – Cores typical core count: 2-8
note: some may not be physical cores
![Page 29: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/29.jpg)
CPU – Cache Size one of the most frequent tasks of a CPU is to read
data from memory (described soon) reading from memory can be slow (by CPU
standards) delay referred to as latency
the CPU must wait until data is received before it can process
hence, lower latency = faster processing
![Page 30: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/30.jpg)
CPU – Cache Size most data for a program is stored in main memory,
or RAM however, modern processors have a small amount
of memory, referred to as cache much smaller than RAM (MB vs GB) much faster than RAM
frequently accessed data is often stored in cache instructions are often stored in cache
hence, more CPU cache = better performance
![Page 31: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/31.jpg)
![Page 32: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/32.jpg)
CPU Performance to summarize:
higher clock speeds improve performance more cores improve performance more cache improves performance
there are other factors that affect performance different instruction sets processor design applications (e.g. gaming)
![Page 33: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/33.jpg)
CPU Performance while factors discussed can affect performance,
they are not perfect indicators e.g. CPU 1 may have a faster clock rate than CPU 2, but
less cache
how can we compare the performance of two processors, given these potentially conflicting specs?
Answer: benchmarks
![Page 34: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/34.jpg)
Benchmark a program, or set of programs, designed to assess
the performance of hardware different benchmarks exist
CPU graphics
groups exist that perform benchmarks and post their scores online
e.g. CPU Benchmark by Passmark http://www.cpubenchmark.net/
![Page 35: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/35.jpg)
Using Benchmarks – Examplesuppose you wish to compare these two
processors
Faster Clock, 4 cores Bigger Cache, 6 cores
![Page 36: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/36.jpg)
![Page 37: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/37.jpg)
![Page 38: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/38.jpg)
Using Benchmarks – Examplehence, the bigger cache and more cores
made up for slower clock speed
Faster Clock, 4 cores Bigger Cache, 6 cores
9633 12105
![Page 39: Computer Science 1000](https://reader035.fdocuments.net/reader035/viewer/2022062314/568134eb550346895d9c2680/html5/thumbnails/39.jpg)
Benchmarksbenchmarks provide a nice tool for
comparing processor performancehowever, benchmarks are not a perfect tool,
and should only be used as a general guideline
depends on your application