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
68
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
93
あなたの知らないバージョン命名規則
sat
PRO
3
900
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
66
バイナリダンプの模様を読む
sat
PRO
0
89
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
87
114-ファイルのshallow_copy.pdf
sat
PRO
2
57
113-Btrfsのスナップショット.pdf
sat
PRO
0
40
Other Decks in Technology
See All in Technology
GoにおけるFFIのこれまでとこれから
goccy
5
3.4k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
520
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
1.4k
安心して変更できるWebフロントエンドの作り方
pirosikick
4
2.5k
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
3k
20260912_スクラムにジェネラリストは必要か
ryugen04
0
420
20260912_スクフェス三河
kgnkhkr
0
380
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
480
AI時代、データエンジニアが一番おもろい
genshun9
0
600
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
510
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
What's in a price? How to price your products and services
michaelherold
247
13k
How to build a perfect <img>
jonoalderson
1
6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Navigating Team Friction
lara
192
16k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
280
It's Worth the Effort
3n
188
29k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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