{"id":1345,"date":"2012-02-27T13:08:40","date_gmt":"2012-02-26T19:08:40","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=1345"},"modified":"2012-03-14T11:21:52","modified_gmt":"2012-03-14T02:21:52","slug":"xv6%e3%82%bd%e3%83%bc%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89%e3%83%aa%e3%83%bc%e3%83%87%e3%82%a3%e3%83%b3%e3%82%b0-%e3%81%9d%e3%81%ae22","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/1345","title":{"rendered":"[xv6 #22] Chapter 2 &#8211; Traps, interrupts, and drivers &#8211; Systems calls, exceptions, and interrupts"},"content":{"rendered":"<p>\u30c6\u30ad\u30b9\u30c8\u306e31\u301c32\u30da\u30fc\u30b8<\/p>\n<h3>\u672c\u6587<\/h3>\n<p>\u30e6\u30fc\u30b6\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001\u7b2c1\u7ae0\u306e\u6700\u5f8c\u3067\u898b\u305f\u3088\u3046\u306b\u3001OS\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u5bfe\u3057\u3066\u554f\u3044\u5408\u308f\u305b\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u4f8b\u5916\uff08exception\uff09\u3068\u3044\u3046\u7528\u8a9e\u306f\u3001\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u7570\u5e38\u306a\u52d5\u304d\u306e\u4e8b\u3067\u3042\u308b\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u7570\u5e38\u306a\u52d5\u304d\u306e\u4f8b\u3068\u3057\u3066\u306f\u3001\u30bc\u30ed\u9664\u7b97\u3001\u7121\u52b9\u306aPTE\u304c\u6307\u3059\u30e1\u30e2\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3059\u308b\u4e8b\u3001\u306a\u3069\u304c\u6319\u3052\u3089\u308c\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\uff08interrupt\uff09\u3068\u3044\u3046\u7528\u8a9e\u306f\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304b\u3089\u751f\u6210\u3055\u308c\u305f\u4fe1\u53f7\u306e\u4e8b\u3067\u3042\u308a\u3001OS\u306b\u5bfe\u3057\u3066\u6ce8\u610f\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u3092\u6307\u3057\u793a\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u6642\u5206\u5272\u306e\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u30af\u30ed\u30c3\u30af\u30c1\u30c3\u30d7\u306f100\u30df\u30ea\u79d2\u6bce\u306b\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u3002<br \/>\n\u4ed6\u306b\u306f\u3001\u30c7\u30a3\u30b9\u30af\u304c\u4e00\u3064\u306e\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u307f\u7d42\u308f\u3063\u305f\u3068\u304d\u3001\u305d\u306e\u30d6\u30ed\u30c3\u30af\u306e\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u53ef\u80fd\u3060\u3068\u3044\u3046\u3053\u3068\u3092OS\u306b\u77e5\u3089\u305b\u308b\u305f\u3081\u306b\u3001\u30c7\u30a3\u30b9\u30af\u304c\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3055\u305b\u308b\u3068\u3044\u3046\u4f8b\u304c\u3042\u308b\u3002<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u3002<br \/>\n\u306a\u305c\u306a\u3089\u3001\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u5fc5\u8981\u306a\u6a29\u9650\u3068\u72b6\u614b\u3092\u30ab\u30fc\u30cd\u30eb\u3060\u3051\u304c\u6301\u3064\u304b\u3089\u3067\u3042\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30af\u30ed\u30c3\u30af\u5272\u308a\u8fbc\u307f\u5fdc\u7b54\u306b\u3088\u3063\u3066\u3001\u8907\u6570\u306e\u30d7\u30ed\u30bb\u30b9\u9593\u3067\u6642\u5206\u5272\u3055\u305b\u308b\u305f\u3081\u306b\u3001\u975e\u5354\u529b\u306a\u30d7\u30ed\u30bb\u30b9\u306b\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u5f37\u5236\u7684\u306b\u624b\u653e\u3055\u305b\u3055\u3048\u3059\u308c\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u306f\u95a2\u4fc2\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\uff08\u3061\u3087\u3063\u3068\u610f\u5473\u4e0d\u660e\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u30d7\u30ed\u30bb\u30b9\u306e\u5207\u66ff\u3092\u884c\u3046\u306e\u3067\u5272\u308a\u8fbc\u307f\u3082\u30ab\u30fc\u30cd\u30eb\u3067\u53d7\u3051\u53d6\u3063\u305f\u307b\u3046\u304c\u90fd\u5408\u304c\u3044\u3044\u3068\u3044\u3046\u3053\u3068\u304b\u306a\u3068\uff09<\/p>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5834\u5408\u3067\u306f\u3001OS\u306e\u30c7\u30b6\u30a4\u30f3\u306f\u305d\u306e\u5f8c\u306b\u8d77\u304d\u308b\u4e8b\u3092\u89e3\u6c7a\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u5f8c\u3067\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u5fa9\u5143\u3059\u308b\u305f\u3081\u306b\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u30ec\u30b8\u30b9\u30bf\u3092\u4fdd\u5b58\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u4f4d\u7f6e\u3092\u9078\u3070\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30ab\u30fc\u30cd\u30eb\u306f\u3001\u305d\u306e\u30a4\u30d9\u30f3\u30c8\u306b\u95a2\u3059\u308b\u60c5\u5831\u3001\u4f8b\u3048\u3070\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u306e\u5f15\u6570\u3001\u3092\u5fa9\u5143\u3067\u304d\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u305d\u308c\u3089\u306f\u5b89\u5168\u78ba\u5b9f\u306b\u5b8c\u4e86\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30e6\u30fc\u30b6\u306e\u30d7\u30ed\u30bb\u30b9\u3068\u30ab\u30fc\u30cd\u30eb\u306e\u72ec\u7acb\u6027\u3092\u7dad\u6301\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u3053\u306e\u30b4\u30fc\u30eb\u3092\u9054\u6210\u3059\u308b\u305f\u3081\u306b\u3001OS\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u3069\u3046\u3084\u3063\u3066\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3084\u4f8b\u5916\u3084\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u304b\u306e\u8a73\u7d30\u3092\u627f\u77e5\u3057\u3066\u304a\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u591a\u304f\u306e\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u305d\u306e3\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u306f\u3001\u4e00\u3064\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u6a5f\u69cb\u306b\u3088\u3063\u3066\u5236\u5fa1\u3055\u308c\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001x86\u3067\u306f\u3001int\u547d\u4ee4\u3092\u4f7f\u3063\u3066\u751f\u6210\u3055\u308c\u305f\u5272\u308a\u8fbc\u307f\u306b\u3088\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3002<br \/>\n\u540c\u69d8\u306b\u3001\u4f8b\u5916\u3082\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u3001\u3082\u3057OS\u304c\u5272\u308a\u8fbc\u307f\u306e\u5236\u5fa1\u306b\u95a2\u3059\u308b\u8a08\u753b\u3092\u6301\u3063\u3066\u3044\u308b\u306a\u3089\u3001OS\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3068\u4f8b\u5916\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<\/p>\n<p>\u305d\u306e\u8a08\u753b\u306e\u57fa\u672c\u7684\u306a\u3082\u306e\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3042\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u304c\u901a\u5e38\u306e\u30d7\u30ed\u30bb\u30c3\u30b5\u30eb\u30fc\u30d7\u3092\u6b62\u3081\u3001\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\uff08interrupt handler\uff09\u3068\u547c\u3070\u308c\u308b\u51e6\u7406\u306e\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u306e\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u305d\u306e\u30ec\u30b8\u30b9\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u3002<br \/>\n\u305d\u308c\u306b\u3088\u3063\u3066OS\u306f\u5272\u308a\u8fbc\u307f\u304b\u3089\u623b\u3063\u3066\u304d\u305f\u3068\u304d\u306b\u30ec\u30b8\u30b9\u30bf\u3092\u5fa9\u5143\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u3053\u306e\u79fb\u308a\u5909\u308f\u308a\uff08\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u3078\u306e\u51e6\u7406\u306e\u79fb\u884c\u3068\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u304b\u3089\u51e6\u7406\u304c\u3082\u3069\u308b\u3053\u3068\uff09\u306b\u304a\u3051\u308b\u6311\u6226\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u30e6\u30fc\u30b6\u30e2\u30fc\u30c9\u304b\u3089\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u3078\u3001\u307e\u305f\u305d\u306e\u9006\u3078\u5207\u308a\u66ff\u308f\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u4e8b\u3067\u3042\u308b\u3002<\/p>\n<p>\u5c02\u9580\u7528\u8a9e\u306b\u3064\u3044\u3066\u3002<br \/>\n\u6b63\u5f0f\u306ax86\u7528\u8a9e\u306f\u5272\u308a\u8fbc\u307f\uff08interrupt\uff09\u3068\u306f\u8a00\u3048\u3001x86\u306f\u305d\u308c\u3089\u306e\u5168\u3066\u3092\u30c8\u30e9\u30c3\u30d7\uff08traps\uff09\u3068\u3057\u3066\u6307\u3059\u3002<br \/>\nPDP11\/40\u3067\u4f7f\u308f\u308c\u3066\u305f\u7528\u8a9e\u3067\u3042\u308a\u3001\u3086\u3048\u306bUnix\u306e\u4f1d\u7d71\u7684\u306a\u7528\u8a9e\u3067\u3042\u308b\u3068\u3044\u3046\u306e\u304c\u4e3b\u306a\u7406\u7531\u3067\u3042\u308b\u3002<br \/>\n\u3053\u306e\u7ae0\u3067\u306f\u3001\u30c8\u30e9\u30c3\u30d7\u3068\u5272\u308a\u8fbc\u307f\u3068\u3044\u3046\u7528\u8a9e\u3092\u7f6e\u304d\u63db\u3048\u53ef\u80fd\u306a\u3082\u306e\u3068\u3057\u3066\u4f7f\u3046\u3002<br \/>\n\u3057\u304b\u3057\u3001\u30c8\u30e9\u30c3\u30d7\u306f\u30d7\u30ed\u30bb\u30c3\u30b5\u4e0a\u3067\u5b9f\u884c\u4e2d\u306e\u73fe\u5728\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u5f15\u304d\u8d77\u3053\u3055\u308c\u308b\uff08\u4f8b\u3048\u3070\u3001\u30d7\u30ed\u30bb\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u7d50\u679c\u7684\u306b\u30c8\u30e9\u30c3\u30d7\u304c\u751f\u6210\u3055\u308c\u308b\uff09\u306e\u306b\u5bfe\u3057\u3001\u5272\u308a\u8fbc\u307f\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u95a2\u4fc2\u306e\u306a\u3044\u30c7\u30d0\u30a4\u30b9\u306b\u3088\u3063\u3066\u5f15\u304d\u8d77\u3053\u3055\u308c\u308b\u3068\u3044\u3046\u9055\u3044\u306b\u306f\u3057\u3063\u304b\u308a\u6ce8\u610f\u3057\u306a\u3055\u3044\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30c7\u30a3\u30b9\u30af\u304c\u3001\u3042\u308b\u30d7\u30ed\u30bb\u30b9\u306e\u305f\u3081\u306b\u4e00\u3064\u306e\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u307f\u8fbc\u307f\u7d42\u308f\u3063\u305f\u3068\u304d\u3001\u5272\u308a\u8fbc\u307f\u304c\u6d3e\u751f\u3059\u308b\u304c\u3001\u305d\u306e\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3057\u305f\u77ac\u9593\u306f\u5225\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u5b9f\u884c\u4e2d\u3060\u308d\u3046\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u306e\u3053\u306e\u7279\u6027\u306f\u3001\u30c8\u30e9\u30c3\u30d7\u306b\u3064\u3044\u3066\u8003\u3048\u308b\u3088\u308a\u5272\u308a\u8fbc\u307f\u306b\u7740\u3044\u3066\u8003\u3048\u308b\u3053\u3068\u3092\u96e3\u3057\u304f\u3057\u3066\u3044\u308b\u3002<br \/>\n\u306a\u305c\u306a\u3089\u3001\u5272\u308a\u8fbc\u307f\u306f\u4ed6\u306e\u6d3b\u52d5\u72b6\u614b\u3068\u4e26\u5217\u306b\u767a\u751f\u3059\u308b\u304b\u3089\u3067\u3042\u308b\u3002<br \/>\n\u3057\u304b\u3057\u3001\u4e21\u65b9\u3068\u3082\u3001\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u3068\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u9593\u3067\u5b89\u5168\u78ba\u5b9f\u306b\u5236\u5fa1\u3092\u79fb\u3059\u305f\u3081\u306b\u540c\u3058\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u6a5f\u69cb\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3002<br \/>\n\u305d\u308c\u306b\u3064\u3044\u3066\u306f\u6b21\u306b\u8aac\u660e\u3059\u308b\u3002<\/p>\n<h3>\u611f\u60f3<\/h3>\n<p>\u4f8b\u5916\u3067\u3082\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3059\u308b\u3057\u3001\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3067\u3082\u767a\u751f\u3059\u308b\u3057\u3001\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u3082\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>int\u547d\u4ee4\u306b\u3064\u3044\u3066\u3002<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)\" title=\"http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)\" target=\"_blank\">http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)<\/a><br \/>\nINT is an assembly language instruction for x86 processors that generates a software interrupt.<br \/>\n\u3068\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u300cx86\u306f\u305d\u308c\u3089\u306e\u5168\u3066\u3092\u30c8\u30e9\u30c3\u30d7\uff08traps\uff09\u3068\u3057\u3066\u6307\u3059\u300d\u306e\u90e8\u5206\u306fxv6\u306e\u9593\u9055\u3044\u3058\u3083\u306a\u3044\u304b\u3068\u3044\u3046\u6c17\u304c\u3057\u307e\u3059\u3002<br \/>\n\u307e\u3041\u3068\u306b\u304b\u304finterrupt\u304cx86\u306e\u6b63\u5f0f\u306a\u7528\u8a9e\u3060\u3051\u3069PDP11\u306e\u7528\u8a9e\u3067\u3042\u308btrap\uff08\u3086\u3048\u306b\u6614\u306a\u304c\u3089\u306eUnix\u7528\u8a9e\u3067\u3082\u3042\u308b\uff09\u3092\u4f7f\u3046\u3088\u3063\u3066\u3053\u3068\u3067\u3059\u304b\u306d\u3002<br \/>\n\u3053\u308c\u307f\u305f\u3089\u78ba\u304b\u306bPDP11\u3067\u306f\u5272\u308a\u8fbc\u307f\u3092trap\u3068\u547c\u3093\u3067\u308b\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture\" title=\"http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture\" target=\"_blank\">http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30ad\u30b9\u30c8\u306e31\u301c32\u30da\u30fc\u30b8<\/p>\n<h3>\u672c\u6587<\/h3>\n<p>\u30e6\u30fc\u30b6\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001\u7b2c1\u7ae0\u306e\u6700\u5f8c\u3067\u898b\u305f\u3088\u3046\u306b\u3001OS\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u5bfe\u3057\u3066\u554f\u3044\u5408\u308f\u305b\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u4f8b\u5916\uff08exception\uff09\u3068\u3044\u3046\u7528\u8a9e\u306f\u3001\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u7570\u5e38\u306a\u52d5\u304d\u306e\u4e8b\u3067\u3042\u308b\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u7570\u5e38\u306a\u52d5\u304d\u306e\u4f8b\u3068\u3057\u3066\u306f\u3001\u30bc\u30ed\u9664\u7b97\u3001\u7121\u52b9\u306aPTE\u304c\u6307\u3059\u30e1\u30e2\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3059\u308b\u4e8b\u3001\u306a\u3069\u304c\u6319\u3052\u3089\u308c\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\uff08interrupt\uff09\u3068\u3044\u3046\u7528\u8a9e\u306f\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304b\u3089\u751f\u6210\u3055\u308c\u305f\u4fe1\u53f7\u306e\u4e8b\u3067\u3042\u308a\u3001OS\u306b\u5bfe\u3057\u3066\u6ce8\u610f\u304c\u5fc5\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u3092\u6307\u3057\u793a\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u6642\u5206\u5272\u306e\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u30af\u30ed\u30c3\u30af\u30c1\u30c3\u30d7\u306f100\u30df\u30ea\u79d2\u6bce\u306b\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u3002<br \/>\n\u4ed6\u306b\u306f\u3001\u30c7\u30a3\u30b9\u30af\u304c\u4e00\u3064\u306e\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u307f\u7d42\u308f\u3063\u305f\u3068\u304d\u3001\u305d\u306e\u30d6\u30ed\u30c3\u30af\u306e\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u53ef\u80fd\u3060\u3068\u3044\u3046\u3053\u3068\u3092OS\u306b\u77e5\u3089\u305b\u308b\u305f\u3081\u306b\u3001\u30c7\u30a3\u30b9\u30af\u304c\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3055\u305b\u308b\u3068\u3044\u3046\u4f8b\u304c\u3042\u308b\u3002<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u3002<br \/>\n\u306a\u305c\u306a\u3089\u3001\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u5fc5\u8981\u306a\u6a29\u9650\u3068\u72b6\u614b\u3092\u30ab\u30fc\u30cd\u30eb\u3060\u3051\u304c\u6301\u3064\u304b\u3089\u3067\u3042\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30af\u30ed\u30c3\u30af\u5272\u308a\u8fbc\u307f\u5fdc\u7b54\u306b\u3088\u3063\u3066\u3001\u8907\u6570\u306e\u30d7\u30ed\u30bb\u30b9\u9593\u3067\u6642\u5206\u5272\u3055\u305b\u308b\u305f\u3081\u306b\u3001\u975e\u5354\u529b\u306a\u30d7\u30ed\u30bb\u30b9\u306b\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u5f37\u5236\u7684\u306b\u624b\u653e\u3055\u305b\u3055\u3048\u3059\u308c\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u306f\u95a2\u4fc2\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\uff08\u3061\u3087\u3063\u3068\u610f\u5473\u4e0d\u660e\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u30d7\u30ed\u30bb\u30b9\u306e\u5207\u66ff\u3092\u884c\u3046\u306e\u3067\u5272\u308a\u8fbc\u307f\u3082\u30ab\u30fc\u30cd\u30eb\u3067\u53d7\u3051\u53d6\u3063\u305f\u307b\u3046\u304c\u90fd\u5408\u304c\u3044\u3044\u3068\u3044\u3046\u3053\u3068\u304b\u306a\u3068\uff09<\/p>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5834\u5408\u3067\u306f\u3001OS\u306e\u30c7\u30b6\u30a4\u30f3\u306f\u305d\u306e\u5f8c\u306b\u8d77\u304d\u308b\u4e8b\u3092\u89e3\u6c7a\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u5f8c\u3067\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u5fa9\u5143\u3059\u308b\u305f\u3081\u306b\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u30ec\u30b8\u30b9\u30bf\u3092\u4fdd\u5b58\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u4f4d\u7f6e\u3092\u9078\u3070\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30ab\u30fc\u30cd\u30eb\u306f\u3001\u305d\u306e\u30a4\u30d9\u30f3\u30c8\u306b\u95a2\u3059\u308b\u60c5\u5831\u3001\u4f8b\u3048\u3070\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u306e\u5f15\u6570\u3001\u3092\u5fa9\u5143\u3067\u304d\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u305d\u308c\u3089\u306f\u5b89\u5168\u78ba\u5b9f\u306b\u5b8c\u4e86\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30e6\u30fc\u30b6\u306e\u30d7\u30ed\u30bb\u30b9\u3068\u30ab\u30fc\u30cd\u30eb\u306e\u72ec\u7acb\u6027\u3092\u7dad\u6301\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u3053\u306e\u30b4\u30fc\u30eb\u3092\u9054\u6210\u3059\u308b\u305f\u3081\u306b\u3001OS\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u3069\u3046\u3084\u3063\u3066\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3084\u4f8b\u5916\u3084\u5272\u308a\u8fbc\u307f\u3092\u5236\u5fa1\u3059\u308b\u304b\u306e\u8a73\u7d30\u3092\u627f\u77e5\u3057\u3066\u304a\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u591a\u304f\u306e\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u305d\u306e3\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u306f\u3001\u4e00\u3064\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u6a5f\u69cb\u306b\u3088\u3063\u3066\u5236\u5fa1\u3055\u308c\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001x86\u3067\u306f\u3001int\u547d\u4ee4\u3092\u4f7f\u3063\u3066\u751f\u6210\u3055\u308c\u305f\u5272\u308a\u8fbc\u307f\u306b\u3088\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3002<br \/>\n\u540c\u69d8\u306b\u3001\u4f8b\u5916\u3082\u5272\u308a\u8fbc\u307f\u3092\u767a\u751f\u3055\u305b\u308b\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u3001\u3082\u3057OS\u304c\u5272\u308a\u8fbc\u307f\u306e\u5236\u5fa1\u306b\u95a2\u3059\u308b\u8a08\u753b\u3092\u6301\u3063\u3066\u3044\u308b\u306a\u3089\u3001OS\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3068\u4f8b\u5916\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<\/p>\n<p>\u305d\u306e\u8a08\u753b\u306e\u57fa\u672c\u7684\u306a\u3082\u306e\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3042\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u304c\u901a\u5e38\u306e\u30d7\u30ed\u30bb\u30c3\u30b5\u30eb\u30fc\u30d7\u3092\u6b62\u3081\u3001\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\uff08interrupt handler\uff09\u3068\u547c\u3070\u308c\u308b\u51e6\u7406\u306e\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u306e\u5b9f\u884c\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u305d\u306e\u30ec\u30b8\u30b9\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u3002<br \/>\n\u305d\u308c\u306b\u3088\u3063\u3066OS\u306f\u5272\u308a\u8fbc\u307f\u304b\u3089\u623b\u3063\u3066\u304d\u305f\u3068\u304d\u306b\u30ec\u30b8\u30b9\u30bf\u3092\u5fa9\u5143\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<br \/>\n\u3053\u306e\u79fb\u308a\u5909\u308f\u308a\uff08\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u3078\u306e\u51e6\u7406\u306e\u79fb\u884c\u3068\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u304b\u3089\u51e6\u7406\u304c\u3082\u3069\u308b\u3053\u3068\uff09\u306b\u304a\u3051\u308b\u6311\u6226\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u30e6\u30fc\u30b6\u30e2\u30fc\u30c9\u304b\u3089\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u3078\u3001\u307e\u305f\u305d\u306e\u9006\u3078\u5207\u308a\u66ff\u308f\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u4e8b\u3067\u3042\u308b\u3002<\/p>\n<p>\u5c02\u9580\u7528\u8a9e\u306b\u3064\u3044\u3066\u3002<br \/>\n\u6b63\u5f0f\u306ax86\u7528\u8a9e\u306f\u5272\u308a\u8fbc\u307f\uff08interrupt\uff09\u3068\u306f\u8a00\u3048\u3001x86\u306f\u305d\u308c\u3089\u306e\u5168\u3066\u3092\u30c8\u30e9\u30c3\u30d7\uff08traps\uff09\u3068\u3057\u3066\u6307\u3059\u3002<br \/>\nPDP11\/40\u3067\u4f7f\u308f\u308c\u3066\u305f\u7528\u8a9e\u3067\u3042\u308a\u3001\u3086\u3048\u306bUnix\u306e\u4f1d\u7d71\u7684\u306a\u7528\u8a9e\u3067\u3042\u308b\u3068\u3044\u3046\u306e\u304c\u4e3b\u306a\u7406\u7531\u3067\u3042\u308b\u3002<br \/>\n\u3053\u306e\u7ae0\u3067\u306f\u3001\u30c8\u30e9\u30c3\u30d7\u3068\u5272\u308a\u8fbc\u307f\u3068\u3044\u3046\u7528\u8a9e\u3092\u7f6e\u304d\u63db\u3048\u53ef\u80fd\u306a\u3082\u306e\u3068\u3057\u3066\u4f7f\u3046\u3002<br \/>\n\u3057\u304b\u3057\u3001\u30c8\u30e9\u30c3\u30d7\u306f\u30d7\u30ed\u30bb\u30c3\u30b5\u4e0a\u3067\u5b9f\u884c\u4e2d\u306e\u73fe\u5728\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u5f15\u304d\u8d77\u3053\u3055\u308c\u308b\uff08\u4f8b\u3048\u3070\u3001\u30d7\u30ed\u30bb\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u7d50\u679c\u7684\u306b\u30c8\u30e9\u30c3\u30d7\u304c\u751f\u6210\u3055\u308c\u308b\uff09\u306e\u306b\u5bfe\u3057\u3001\u5272\u308a\u8fbc\u307f\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30bb\u30b9\u306b\u95a2\u4fc2\u306e\u306a\u3044\u30c7\u30d0\u30a4\u30b9\u306b\u3088\u3063\u3066\u5f15\u304d\u8d77\u3053\u3055\u308c\u308b\u3068\u3044\u3046\u9055\u3044\u306b\u306f\u3057\u3063\u304b\u308a\u6ce8\u610f\u3057\u306a\u3055\u3044\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u30c7\u30a3\u30b9\u30af\u304c\u3001\u3042\u308b\u30d7\u30ed\u30bb\u30b9\u306e\u305f\u3081\u306b\u4e00\u3064\u306e\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u307f\u8fbc\u307f\u7d42\u308f\u3063\u305f\u3068\u304d\u3001\u5272\u308a\u8fbc\u307f\u304c\u6d3e\u751f\u3059\u308b\u304c\u3001\u305d\u306e\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3057\u305f\u77ac\u9593\u306f\u5225\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u5b9f\u884c\u4e2d\u3060\u308d\u3046\u3002<br \/>\n\u5272\u308a\u8fbc\u307f\u306e\u3053\u306e\u7279\u6027\u306f\u3001\u30c8\u30e9\u30c3\u30d7\u306b\u3064\u3044\u3066\u8003\u3048\u308b\u3088\u308a\u5272\u308a\u8fbc\u307f\u306b\u7740\u3044\u3066\u8003\u3048\u308b\u3053\u3068\u3092\u96e3\u3057\u304f\u3057\u3066\u3044\u308b\u3002<br \/>\n\u306a\u305c\u306a\u3089\u3001\u5272\u308a\u8fbc\u307f\u306f\u4ed6\u306e\u6d3b\u52d5\u72b6\u614b\u3068\u4e26\u5217\u306b\u767a\u751f\u3059\u308b\u304b\u3089\u3067\u3042\u308b\u3002<br \/>\n\u3057\u304b\u3057\u3001\u4e21\u65b9\u3068\u3082\u3001\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u3068\u30ab\u30fc\u30cd\u30eb\u30e2\u30fc\u30c9\u9593\u3067\u5b89\u5168\u78ba\u5b9f\u306b\u5236\u5fa1\u3092\u79fb\u3059\u305f\u3081\u306b\u540c\u3058\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u6a5f\u69cb\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3002<br \/>\n\u305d\u308c\u306b\u3064\u3044\u3066\u306f\u6b21\u306b\u8aac\u660e\u3059\u308b\u3002<\/p>\n<h3>\u611f\u60f3<\/h3>\n<p>\u4f8b\u5916\u3067\u3082\u5272\u308a\u8fbc\u307f\u304c\u767a\u751f\u3059\u308b\u3057\u3001\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3067\u3082\u767a\u751f\u3059\u308b\u3057\u3001\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u3082\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>int\u547d\u4ee4\u306b\u3064\u3044\u3066\u3002<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)\" title=\"http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)\" target=\"_blank\">http:\/\/en.wikipedia.org\/wiki\/INT_(x86_instruction)<\/a><br \/>\nINT is an assembly language instruction for x86 processors that generates a software interrupt.<br \/>\n\u3068\u3044\u3046\u3053\u3068\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u300cx86\u306f\u305d\u308c\u3089\u306e\u5168\u3066\u3092\u30c8\u30e9\u30c3\u30d7\uff08traps\uff09\u3068\u3057\u3066\u6307\u3059\u300d\u306e\u90e8\u5206\u306fxv6\u306e\u9593\u9055\u3044\u3058\u3083\u306a\u3044\u304b\u3068\u3044\u3046\u6c17\u304c\u3057\u307e\u3059\u3002<br \/>\n\u307e\u3041\u3068\u306b\u304b\u304finterrupt\u304cx86\u306e\u6b63\u5f0f\u306a\u7528\u8a9e\u3060\u3051\u3069PDP11\u306e\u7528\u8a9e\u3067\u3042\u308btrap\uff08\u3086\u3048\u306b\u6614\u306a\u304c\u3089\u306eUnix\u7528\u8a9e\u3067\u3082\u3042\u308b\uff09\u3092\u4f7f\u3046\u3088\u3063\u3066\u3053\u3068\u3067\u3059\u304b\u306d\u3002<br \/>\n\u3053\u308c\u307f\u305f\u3089\u78ba\u304b\u306bPDP11\u3067\u306f\u5272\u308a\u8fbc\u307f\u3092trap\u3068\u547c\u3093\u3067\u308b\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture\" title=\"http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture\" target=\"_blank\">http:\/\/en.wikipedia.org\/wiki\/PDP-11_architecture<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[405],"class_list":["post-1345","post","type-post","status-publish","format-standard","hentry","category-tech","tag-xv6"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/1345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=1345"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/1345\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=1345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=1345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=1345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}