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
ポーリングと割り込み
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
63
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
92
あなたの知らないバージョン命名規則
sat
PRO
3
890
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
63
Machine Check Exception
sat
PRO
2
63
バイナリダンプの模様を読む
sat
PRO
0
88
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
86
114-ファイルのshallow_copy.pdf
sat
PRO
2
55
113-Btrfsのスナップショット.pdf
sat
PRO
0
40
Other Decks in Technology
See All in Technology
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
240
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
970
PfEingのアプローチで働こう
rindrics
0
170
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.1k
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
190
PdMをやめて、 "プロダクトビルダー"という 働き方に変えました / PdM to Product Builder
shikichee
2
700
Webとヘルスデータ
yukukotani
0
170
Tab5をRubyで動くパソコンにする
kishima
1
170
JAWS-UG初心者支部#88わいわい初心塾(夏休みの宿題やったかGit編)
otsuki
0
120
AI時代におけるプロダクト横断勉強会の設計
zozotech
PRO
0
150
IoTハンズオンの舞台裏
shirouz
2
110
2026-09-04 SRE Tech Talk #15 怠惰なTerraform / Lazy Terraform
masasuzu
0
190
Featured
See All Featured
Abbi's Birthday
coloredviolet
3
9.7k
The agentic SEO stack - context over prompts
schlessera
0
890
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Ruling the World: When Life Gets Gamed
codingconduct
0
320
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
260
Building the Perfect Custom Keyboard
takai
2
860
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
920
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
My Coaching Mixtape
mlcsv
0
300
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.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