You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
さくらインターネット Advent Calendar最終日は、硬派にLinuxのメモリに関する基礎知識についてみてみたいと思います。 最近はサーバーを意識せずプログラミングできるようになり、メモリの空き容量について意識することも少なくなりましたが、いざ低レイヤーに触れなければいけないシチュエーションになった際に、OSを目の前に呆然とする人が多いようです。 基本的にLinux のパフォーマンスについて、メモリをたくさんつめばいいとか、スワップさせないほうが良い とか、このあたりは良く知られたことだと思います。 ただ、なんとなく ps コマンドや free コマンド などの結果を見るだけでなく、もう少しメモリのことについて掘り下げてみてみたいと思います。 メモリとキャッシュ Linux におけるメモリの状態を大きく分けると「使用中のメモリ」「キャッシュ」「空きメモリ」「スワップ」の 4 つに分
デバイスドライバに頼らないハードウェア操作 [| ] 最終更新: 2023/02/14 18:32:04 デバイスドライバは要らない? ただ、ハードウェアを操作するだけなら、デバイスドライバは必須ではありません。 なぜなら、Linux は root 権限のあるプログラムであれば、ハードウェア(I/Oポート、メモリ)にアクセスできるからです。 PCIの情報はというと /proc/pci 、 /proc/bus/pci/devices をよむと一通りのPCIデバイスの一覧を得ることができます。 ここでは各デバイスにアクセスするための I/Oポートアドレス、メモリアドレスが得られます。 デバイスドライバを作る利点もいろいろとありますが、ここでは、作らずに済む方法を示します。 デバイスドライバを作らなくともできること デバイスドライバをつくらなくとも、ハードの操作はできます。 I/Oポートに対する
Howtoは、Armadilloシリーズを有効に活用するための参考資料です。使用ソフトウェアのバージョンなど諸条件の差異によって、記載内容と実際の動作が異なる場合があります。また、すべての機能検証や長期の動作試験を行ったものではありませんので、必ずご使用目的に適合した検証・試験を行ってください。 Armadilloの拡張バスを利用して、メモリマップドデバイスを接続した場合など、 本来そのデバイス専用のデバイスドライバを作成するのが一般的です。 しかしながら、Linuxカーネル用のデバイスドライバを作成するのはなかなかハードルが高い作業です。デバイスの制御が簡単な場合、アプリケーションから制御できると便利ですね。 そこで、本Howtoではアプリケーションからデバイスを制御する方法を示します。 本Howtoでは、GPLのフリーソフト "devmem2" を利用します。 devmem2は、"Si
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く