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
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
Search
Satoru Takeuchi
PRO
July 19, 2024
Technology
280
1
Share
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
以下動画のテキストです。
https://youtu.be/GwLZaMPhInM
Satoru Takeuchi
PRO
July 19, 2024
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
小学校5,6年生向けキャリア教育 大人になるまでの道
sat
PRO
8
3.4k
ファイルシステムの不整合
sat
PRO
2
130
書籍執筆での生成AIの活用
sat
PRO
2
440
ChatGPTに従って体調管理2026
sat
PRO
0
170
eBPF
sat
PRO
1
140
waruiBPF
sat
PRO
0
120
eBPFとwaruiBPF
sat
PRO
5
4.4k
Pythonのコードの気になる行でスタックトレースを出す
sat
PRO
1
110
ソースコードを読むときの思考プロセスの例 ~markdownのレンダリング方法を知りたかった2 markdownパッケージ~
sat
PRO
0
220
Other Decks in Technology
See All in Technology
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
120
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
120
OPENLOGI Company Profile for engineer
hr01
1
61k
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
200
How to install a gem
indirect
0
2k
CREがSLOを握ると 何が変わるのか
nekomaho
0
320
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
120
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
130
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
11
6.9k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
Bref でサービスを運用している話
sgash708
0
210
Cursor Subagentsはいいぞ
yug1224
2
120
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
220
The agentic SEO stack - context over prompts
schlessera
0
720
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
280
How STYLIGHT went responsive
nonsquared
100
6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
100
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
180
[SF Ruby Conf 2025] Rails X
palkan
2
870
We Are The Robots
honzajavorek
0
210
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
170
Exploring anti-patterns in Rails
aemeredith
2
300
Transcript
プロセスへのメモリ割り当て(4) 実際に使うときにメモリを獲得する デマンドページング(実践編) Jul. 19th, 2024 Satoru Takeuchi X: satoru_takeuchi
1
はなすこと • これまでに学んだこと ◦ Linuxはデマンドページング方式でプロセスにメモリを割り当てる • 実際にそうなることを実験で確認 • 実験環境 ◦
Ubuntu 22.04.4 LTS ◦ kernel 5.15.0-107-generic 2
実験プログラム • demand-paging.py ◦ mmapを呼び出して100MiBのメモリを獲得 ◦ 1秒に1回、先頭から順番に 10MiBづつ、合計100MiBの領域にアクセス 3 仮想アドレス空間
1. 100MiBの領域をmmap 2. 先頭10MiBにアクセス 3. 次の10MiBにアクセス …
実験中に別端末でメモリ関連の統計情報を見る • sar -r 1 ◦ 1秒間に1回メモリ関連統計情報を出力 • 見るべきフィールド ◦
kbmemused: 使用中のメモリ量[KiB] 4
実験中… • 上の端末 ◦ ./demand-paging.py • 下の端末 ◦ sar -r
1 5
まとめ • Linuxがデマンドページング方式でメモリ獲得していることがわかった ◦ mmap発行時にはメモリ使用量は増えない ◦ メモリ使用量が増えるのは実際にメモリアクセスしたとき 6