2019-03-01から1ヶ月間の記事一覧

linux kernelにおけるtimerについて

linux kernelにおけるtimerについて(Timing Measurementsについて) はじめに user landで見えるtimerは時刻の取得やsiginfoとか、epollといったselect系など関数でのtimeoutの設定で用いられるが、kernel側でのtimerの利用はこれとは大きく異なる1。 本記事…

linux2.6の場合のExceptionと`int $0x80`(system call)の挙動

linux2.6の場合のExceptionとint $0x80の挙動 前の記事でxv6ではどうなのかを述べた。今回はlinux kernel(2.6.11)の場合のexceptionとint $0x80の挙動についてまとめる。今回も長いので、I/O APIC, local APICがからんだinterruptは後回しにしたい。 referen…

xv6の場合のExceptionとInterruptの挙動

ExceptionとInterruptの挙動 linux2.6.11の場合のExceptionとInterruptの挙動をまとめようと思って、xv6との比較を書いていたが分量が多くなりすぎたので、簡単にxv6ではException、Interruptをどう処理しているのかをまとめる。 Reference http://www.cse.i…

`switch_to`を読んでみる

reference Understanding the Linux Kernel ch.3 http://caspar.hazymoon.jp/OpenBSD/annex/gcc_inline_asm.html オペランド制約の部分が非常によくまとまっている 概要 linux kernel 2.6.11より schedule() => context_switch(rq, prev, next); => switch_t…

GDTとIDT周辺の理解(xv6を例に)

Motivation Understanding the Linux Kernelを読もうとしたけど、生半可な気持ちでは臨めなさそうなので、xv6で理解の確認しつつ、linux kernel 2.6ではどうなの?という把握をすれば良さそう。 そこで、Understanding the Linux KernelのChapter 2: Memory …