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
1
250
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
以下動画のテキストです。
https://youtu.be/GwLZaMPhInM
Satoru Takeuchi
PRO
July 19, 2024
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
「Linux」という言葉が指すもの
sat
PRO
4
140
APIとABIの違い
sat
PRO
5
62
ファイルシステムへのアクセス方法
sat
PRO
0
26
ファイルシステム
sat
PRO
1
34
低レイヤソフトウェア技術者が YouTuberとして食っていこうとした話
sat
PRO
7
6.1k
ポーリングと割り込み
sat
PRO
1
81
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
140
会社員しながら本を書いてきた知見の共有
sat
PRO
3
890
デバイスにアクセスするデバイスファイル
sat
PRO
1
63
Other Decks in Technology
See All in Technology
未経験者・初心者に贈る!40分でわかるAndroidアプリ開発の今と大事なポイント
operando
6
750
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
240
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
480
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
280
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
500
共有と分離 - Compose Multiplatform "本番導入" の設計指針
error96num
2
1.2k
Snowflake×dbtを用いたテレシーのデータ基盤のこれまでとこれから
sagara
0
130
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
550
新アイテムをどう使っていくか?みんなであーだこーだ言ってみよう / 20250911-rpi-jam-tokyo
akkiesoft
0
350
Aurora DSQLはサーバーレスアーキテクチャの常識を変えるのか
iwatatomoya
1
1.2k
slog.Handlerのよくある実装ミス
sakiengineer
4
480
AI時代を生き抜くエンジニアキャリアの築き方 (AI-Native 時代、エンジニアという道は 「最大の挑戦の場」となる) / Building an Engineering Career to Thrive in the Age of AI (In the AI-Native Era, the Path of Engineering Becomes the Ultimate Arena of Challenge)
jeongjaesoon
0
260
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
70
11k
A Tale of Four Properties
chriscoyier
160
23k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
930
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Speed Design
sergeychernyshev
32
1.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Large-scale JavaScript Application Architecture
addyosmani
513
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
What's in a price? How to price your products and services
michaelherold
246
12k
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