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
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Satoru Takeuchi
PRO
July 19, 2024
Technology
290
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プロセスへのメモリ割り当て4 - 実際に使うときにメモリを獲得するデマンドページング(実践編)
以下動画のテキストです。
https://youtu.be/GwLZaMPhInM
Satoru Takeuchi
PRO
July 19, 2024
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
67
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
10分で知る最近のOmarchy
komagata
0
280
AI時代、データエンジニアが一番おもろい
genshun9
0
440
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
180
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
140
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.5k
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
140
事業課題から技術的負債に向き合う
sansantech
PRO
2
540
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
200
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
2
620
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
240
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
190
Tab5をRubyで動くパソコンにする
kishima
2
360
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
エンジニアに許された特別な時間の終わり
watany
108
250k
Code Review Best Practice
trishagee
74
20k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
What's in a price? How to price your products and services
michaelherold
247
13k
First, design no harm
axbom
PRO
2
1.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Code Reviewing Like a Champion
maltzj
528
40k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
Fireside Chat
paigeccino
43
4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
How to build a perfect <img>
jonoalderson
1
6k
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