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
73
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
98
あなたの知らないバージョン命名規則
sat
PRO
3
910
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
66
Machine Check Exception
sat
PRO
2
67
バイナリダンプの模様を読む
sat
PRO
0
92
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
92
114-ファイルのshallow_copy.pdf
sat
PRO
2
59
113-Btrfsのスナップショット.pdf
sat
PRO
0
42
Other Decks in Technology
See All in Technology
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
320
Claude Designがめちゃくちゃ便利なので使ってほしい
diggymo
0
170
「大丈夫そう?」をObservabilityで確かめる
mrmtsu
0
240
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
110
Antigravity SDK for the Java Developer
glaforge
0
240
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
340
IR Today: Theory, Practice, and Agents
dtunkelang
0
270
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
1
110
キャリアLT今日までそして明日から
kentapapa
1
130
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
430
認知負荷を吸収し、プロダクトをまたぐPR Preview基盤の設計事例
taiki45
2
550
Databricksメトリクスビューはじめてのもくもく会
taka_aki
0
140
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Documentation Writing (for coders)
carmenintech
77
5.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Git: the NoSQL Database
bkeepers
PRO
432
67k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
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