커널 2.4의 interrupt 정리 1

chlrbgh0의 이미지

이 글은 O'Reilly에서 출판된 리눅스 커널의 이해를 읽고 개인적으로 정리한 내용이다.

인터럽트 : 커널 2.4에서 인터럽트란 exception(예외)과 일반적인 의미의 인터럽트 두가지로 구분된다.

exception은 예외/프로세스 수행중의 구문에러등으로 인한 인터럽트를 의미힌다. 일반적으로 인터럽트는

프로세스와 비교하여 포함하고있는 컨텍스트가 적어 context switching이 프로세스보다 빠르다. 이는 짧

은 수행속도를 가짐을 의미한다.

인터럽트의 특징은 크게 3가지가 있다.

첫째, 인터럽트는 커널이 어떠한 작업을 수행하는 중이라도 언제든지 발생할 수 있다. 커널의 인터럽트 처리

는 두가지로 구분 되는데, dynamic한 인터럽트 처리를 하는 top half와 인터럽트를 처리하는 linked-list

를 이용한 일련의 큐를 관리하여 인터럽트처리를 나중으로 미루는 bottom half가 있고, 리눅스 커널 2.4

의 경우 bottom half를 사용한다.

둘째, 첫째 특징에서 인터럽트는 어떠한 상황에서도 발생할 수 있다고 했는 데, 이는 커널이 이미 인터럽트

를 처리하는 상황에서도 다른 인터럽트가 발생하게 될 수도 있음을 의미한다. 인터럽트 간에는 인터럽트 핸

들러가 존재하여 이들 인터럽트를 제어하는 커널의 제어경로가 중첩되어도 이를 무난한 실행이 가능하도록

인터럽트 핸들러는 well made 되어 있어야 한다.

셋째, 커널은 인터럽트를 처리하는 동안에도 인터럽트가 발생하면 처리할 수 있지만, 특정한 커널 코드 내에

서는 이를 방지해야하는 경우가 있다. 이는 함수의 atomic한 수행을 돕는 기법으로 임계영역(critical

section/region)이라는 원자적인 블레스를 두어 이 안에서의 프로세스 수행시에는 다른 프로세스의 간섭을

받지않는 영역이다. 이는 세마포어를 이용하여 임계영역을 구현하여 사용한다.

분량이 많아 이후에 내용을 다시 추가하도록 한다.

댓글

DeniseOliver의 이미지

Old school students composed the research papers by their own and it could failure their grades. However, everything is altered in modern world and college students would have a chance to purchase essay service from premium essay service writing services.

DorotheaHunter27의 이미지

With the purpose to prevent the failures in the dissertation discussion, it would be better to buy the good enough theme associated with this good topic in the buy dissertation service online. It is not very hard to have the doctoral degree going that great way.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.