Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ポーリングと割り込み
Search
Satoru Takeuchi
PRO
July 16, 2025
Technology
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ポーリングと割り込み
以下動画のテキストです
https://youtu.be/QY1O_XzKN64
Satoru Takeuchi
PRO
July 16, 2025
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
78
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
110
あなたの知らないバージョン命名規則
sat
PRO
3
920
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
74
Machine Check Exception
sat
PRO
2
70
バイナリダンプの模様を読む
sat
PRO
0
110
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
110
114-ファイルのshallow_copy.pdf
sat
PRO
2
62
113-Btrfsのスナップショット.pdf
sat
PRO
0
46
Other Decks in Technology
See All in Technology
Getting Started with Google Antigravity
glaforge
0
270
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
150
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
950
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
270
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
120
Classmethod Company Deck
satoshi7
0
340
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
130
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
380
パッチ更新でterraform initが落ちた日
grimoh
1
140
大型犬好きによるPugの紹介
yamanoku
1
150
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
910
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
450
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Claude Code のすすめ
schroneko
67
230k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
530
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
260
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Become a Pro
speakerdeck
PRO
31
6.3k
Side Projects
sachag
456
43k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Designing for Performance
lara
612
70k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Transcript
ポーリングと割り込み Jul. 16th, 2025 Satoru Takeuchi X: satoru_takeuchi 1
おさらい • おさらい: デバイスへのアクセスの流れ 1. CPU: デバイスのレジスタを介してデバイスに処理を依頼 2. デバイス: なんらかの処理をする
3. デバイス: 処理が完了する 4. デバイス: 処理の完了をCPUが認識できるようにする 5. CPUが完了を認識して、結果に応じた処理をする • 本動画のトピック: step4をどのように実現するか 1. ポーリング ▪ 📝 「その 100 デバイスドライバ」の方法 ▪ デバイスがレジスタの値を更新して、 CPUがその値を読む 2. 割り込み ▪ デバイスからCPUに処理の完了を通知する 2
ポーリング: シンプルなもの 3 p0 p1 p 0 デバイスドライバ p 0
時間 p1 p0 … CPU デバイス 依頼された処理を実行中 デバイスドライバに処 理を依頼 デバイスに処理を依頼 処理完了を示す値を レジスタに書き込む レジスタをひたすら読む 処理完了を検出 何もしていない 何もしていない
ポーリング: 他のことをしながら定期的に実行 4 p0 p1 p 0 p 0 時間
p1 CPU デバイス 依頼された処理を実行中 デバイスドライバに処 理を依頼 デバイスに処理を依頼 処理完了を示す値を レジスタに書き込む 所定間隔でレジスタ読み出し 処理完了を検出 デバイスドライバ p1 p1 p1 p1 p1 何もしていない
割り込み 5 p1 p0 p1 p 0 p 0 時
間 p1 p0 … CPU デバイス 依頼された処理を実行中 デバイスドライバに 処理を依頼 デバイスに処理を依頼 処理完了を検出 デバイスドライバ デバイスドライバ 処理完了を通知 デバイスの処理完了まで 他の処理を動かせる 何もしていない 何もしていない
どっちが使われている? • ほとんどの場合は割り込みを使う • 稀にポーリングを使うこともある ◦ 割り込みをサポートしていない ◦ 極めて低いレイテンシを求められる ▪
e.g. NICのパケット処理に専用コアを割り当てる DPDK • 1つのドライバ内で両者を使い分けることもある ◦ 負荷が低いときは割り込み、高いときはポーリング 6
まとめ • デバイスの処理完了を待つしくみ ◦ ポーリング: CPUがデバイスのレジスタを定期的に読み出す ◦ 割り込み: デバイスがCPUに処理の完了を通知する •
主に割り込みを使うが、ポーリングを使う場合もある 7