Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What is processor (brighton ruby edition)
Search
Penelope Phippen
July 09, 2016
Technology
0
95
What is processor (brighton ruby edition)
Penelope Phippen
July 09, 2016
Tweet
Share
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
540
How RSpec Works
penelope_zone
0
6.5k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
77
Teaching RSpec to play nice with Rails
penelope_zone
2
120
Little machines that eat strings
penelope_zone
1
85
What is processor?
penelope_zone
1
340
extremely defensive coding - rubyconf edition
penelope_zone
0
250
Agile, etc.
penelope_zone
2
210
Extremely Defensive Coding
penelope_zone
0
90
Other Decks in Technology
See All in Technology
困難を「一般解」で解く
fujiwara3
8
2.3k
Oracle Database Technology Night #87-1 : Exadata Database Service on Exascale Infrastructure(ExaDB-XS)サービス詳細
oracle4engineer
PRO
1
220
20250304_赤煉瓦倉庫_DeepSeek_Deep_Dive
hiouchiy
2
130
LayerXにおけるAI活用事例とその裏側(2025年2月) バクラクの目指す “業務の自動運転” の例 / layerx-ai-deim2025
yuya4
4
700
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
300
Introduction to OpenSearch Project - Search Engineering Tech Talk 2025 Winter
tkykenmt
2
220
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
180
Snowflake ML モデルを dbt データパイプラインに組み込む
estie
0
120
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
9
1.9k
アジリティを高めるテストマネジメント #QiitaQualityForward
makky_tyuyan
1
390
役員・マネージャー・著者・エンジニアそれぞれの立場から見たAWS認定資格
nrinetcom
PRO
5
6.8k
[OpsJAWS Meetup33 AIOps] Amazon Bedrockガードレールで守る安全なAI運用
akiratameto
1
140
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1.1k
Adopting Sorbet at Scale
ufuk
75
9.2k
Visualization
eitanlees
146
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Typedesign – Prime Four
hannesfritz
41
2.5k
A Philosophy of Restraint
colly
203
16k
It's Worth the Effort
3n
184
28k
Code Review Best Practice
trishagee
67
18k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
A Tale of Four Properties
chriscoyier
158
23k
Transcript
What is Processor?
None
None
None
None
3.days.ago
new DateTime( System.currentTime() - 3 * 24 * 3600 )
Thinking in terms of the domain
Instead of thinking in terms of the computer
This is one way we can measure abstraction
Amount of computers
Amount of computers
SQL Amount of computers
select * from sheep_parts
None
None
None
None
SQL Amount of computers
SQL C Amount of computers
int main() { printf(“Hello\n”); return 0; }
Let’s look at one difference
None
None
None
None
None
None
None
None
Human readable source code at execution time
Interpreted
Compiled
None
(it’s a gnu)
(it’s a gnu)
None
Source code separate at execution time
So why is C “low level”
John sort of stole my thunder
Hacker news has been lying to you
None
Those earlier languages express similar ideas.
Ruby has an object model
C has a memory model
C Amount of computers
C Assembly Amount of computers
Memory is slow
The accumulator from baby encodes this concept
Register Tiny piece of memory in the processor that can
beaccessed very quickly
mov 3, $c mov 4, $d add $c, $d, $a
mov 3, $c mov 4, $d add $c, $d, $a
Execution
mov 3, $c mov 4, $d add $c, $d, $a
mov 3, $c mov 4, $d add $c, $d, $a
Instructions (do exactly one thing to the processor)
Operation mov 3, $c mov 4, $d add $c, $d,
$a
Operand mov 3, $c mov 4, $d add $c, $d,
$a
Operand mov 3, $c mov 4, $d add $c, $d,
$a
mov 3, $c mov 4, $d add $c, $d, $a
Operand Register reference
a: nil b: nil c: nil d: nil mov 3,
$c mov 4, $d add $c, $d, $a
a: nil b: nil c: 3 d: nil mov 3,
$c mov 4, $d add $c, $d, $a
a: nil b: nil c: 3 d: nil mov 3,
$c mov 4, $d add $c, $d, $a
a: nil b: nil c: 3 d: 4 mov 3,
$c mov 4, $d add $c, $d, $a
a: nil b: nil c: 3 d: 4 mov 3,
$c mov 4, $d add $c, $d, $a
a: 7 b: nil c: 3 d: 4 mov 3,
$c mov 4, $d add $c, $d, $a
(it’s a gnu)
None
None
None
C Assembly Amount of computers
Assembly Binary Amount of computers
Let’s talk about how machine code gets executed
(one model)
Fetch
Decode
Execute
Retire
FDER
None
None
None
0: 0x36010000 1: 0x03040501 2: 0x23813200 PC: 0 IR: <nil>
IR: 0x36010000
Decode
0x36010283
0x36010283 0x36: add
0x36010283 0x36: add 0x01: value 1
0x36010283 0x36: add 0x01: value 1 0x02: value 2
0x36010283 0x36: add 0x01: value 1 0x02: value 2 0x83:
register 3
None
None
IR: 0x36010283 PC: 0 A: <nil> B: <nil> C: <nil>
Execute
IR: 0x36010283 PC: 0 A: <nil> B: <nil> C: <nil>
IR: 0x36010283 PC: 0 C: <nil>
IR: 0x36010283
IR: 0x36 01 02 83 10 2 3 +
Retire
IR: 0x36010283 PC: 0 A: <nil> B: <nil> C: <nil>
3
IR: 0x36010283 PC: 0 A: <nil> B: <nil> C: 3
3
IR: <nil> PC: 1 A: <nil> B: <nil> C: 3
3
0: 0x36010000 1: 0x03040501 2: 0x23813200 PC: 1
This process repeats
That’s how programs execute (kinda) (I’m still lying to you)
Fetch: get instruction from memory into processor
Decode: prep processor for instruction
Execute: do computation
Retire: results and cleanup
Thanks @samphippen sphippen@do.co