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
140
0
Share
What is processor (brighton ruby edition)
Penelope Phippen
July 09, 2016
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
610
How RSpec Works
penelope_zone
0
6.8k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
110
Teaching RSpec to play nice with Rails
penelope_zone
2
170
Little machines that eat strings
penelope_zone
1
130
What is processor?
penelope_zone
1
380
extremely defensive coding - rubyconf edition
penelope_zone
0
290
Agile, etc.
penelope_zone
2
250
Extremely Defensive Coding
penelope_zone
0
130
Other Decks in Technology
See All in Technology
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
160
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
250
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
930
Oracle Cloud Infrastructure:2026年5月度サービス・アップデート
oracle4engineer
PRO
1
240
Typiaで配信JSONの安全性を構造的に担保する(TSKaigi2026)
righttouch
PRO
1
200
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
300
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1k
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
150
責任あるソフトウェアエンジニアリングの紹介4章・5章 / RSE_Ch4-5
ido_kara_deru
0
370
Diagnosing performance problems without the guesswork
elenatanasoiu
0
120
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
320
Kiro CLI v2.0.0がやってきた!
kentapapa
0
210
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
240
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
170
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
150
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
Designing for Performance
lara
611
70k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Ruling the World: When Life Gets Gamed
codingconduct
0
240
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
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
[email protected]