{"id":41552,"date":"2026-05-26T09:01:07","date_gmt":"2026-05-26T00:01:07","guid":{"rendered":"https:\/\/blog.agentsoft.co.kr\/index.php\/2026\/05\/26\/41552\/"},"modified":"2026-05-26T09:01:07","modified_gmt":"2026-05-26T00:01:07","slug":"pintos-project-1-%ed%95%9c%ea%b5%ad%ec%96%b4-%ec%84%a4%eb%aa%85%ec%84%9c-design-report-alarm-clock-priority-scheduling-advanced-scheduling","status":"publish","type":"post","link":"https:\/\/blog.agentsoft.co.kr\/index.php\/2026\/05\/26\/41552\/","title":{"rendered":"Pintos Project 1 \ud55c\uad6d\uc5b4 \uc124\uba85\uc11c (design report) &#8211; Alarm clock, Priority Scheduling, Advanced Scheduling"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image4.happycampus.com\/Production\/thumbnail\/2024\/06\/15\/data30007221-0001.jpg\"><img decoding=\"async\" src=\"https:\/\/image4.happycampus.com\/Production\/thumbnail\/2024\/06\/15\/data30007221-0002.jpg\"><\/p>\n<p><strong>\ubaa9\ucc28<\/strong><\/p>\n<p>0. analysis<br \/>\n0.1. thread<br \/>\n0.1.1. struct thread<br \/>\n0.1.2. thread functions<br \/>\n&#8211; [thread \uc2dc\uc791 \uad00\ub828 function]<br \/>\n&#8211; [thread \uad00\ub9ac function]<br \/>\n&#8211; [thread \ub3d9\uc791 \uad00\ub828 function]<br \/>\n&#8211; [scheduling function]<br \/>\n&#8211; [timer \uad00\ub828 function]<br \/>\n0.1.3. list<br \/>\n&#8211; [list function]<br \/>\n0.1.4. how to switch thread<br \/>\n0.2. synchronization<br \/>\n0.2.1. meaning of synchronization<br \/>\n0.2.2. disabling interrupts<br \/>\n0.2.2.1. meaning of disabling interrupts<br \/>\n0.2.2.2. caution<br \/>\n0.2.2.3. implement<br \/>\n0.2.3. semaphore<br \/>\n0.2.3.1. meaning of semaphore<br \/>\n0.2.3.2. implementation<br \/>\n0.2.4. lock<br \/>\n0.2.4.1. meaning of lock<br \/>\n0.2.4.2. implementation<br \/>\n0.2.5. condition<br \/>\n0.2.5.1. meaning of condition<br \/>\n0.2.5.2. implementation<br \/>\n0.2.6. interrupt handling<br \/>\n0.2.6.1. external interrupt handling<\/p>\n<p>1. alarm clock<br \/>\n1.1. current implementation<br \/>\n1.1.1. timer.c functions<br \/>\n1.1.2. busy-waiting<br \/>\n1.2. new implementation<\/p>\n<p>2. priority scheduling<br \/>\n2.1. current implementation<br \/>\n2.2. new implementation<br \/>\n2.2.1. priority scheduling modification<br \/>\n2.2.2. synchronization modification<br \/>\n2.2.3. priority donation modification<\/p>\n<p>3.advanced scheduling<br \/>\n3.1. MLFQS<br \/>\n3.2. Priority scheduling<br \/>\n3.2.1. ready queue \uad00\ub9ac<br \/>\n3.2.2. priority \uad00\ub9ac<br \/>\n3.2.3. priority \uacc4\uc0b0<br \/>\n3.3. fixed-point arithmetic<br \/>\n3.4. implementation<\/p>\n<p><strong>\ubcf8\ubb38\ub0b4\uc6a9<\/strong><\/p>\n<p>0.1. thread<br \/>\npintos\uc5d0\uc11c\ub294 thread creation\uacfc thread completion, Round-Robin \ubc29\uc2dd\uc758 thread switching(simple scheduler)\uc744 \uc774\ubbf8 \uad6c\ud604\ud574 \ub450\uc5c8\ub2e4.<br \/>\n0.1.1. struct thread<br \/>\nkernel thread\uc758 struct\ub294 \u201cthreads\/thread.h\u201d\uc5d0 \uc120\uc5b8\ub418\uc5b4 \uc788\ub2e4.<br \/>\nthread structure\uc740 4kB page\ub97c \ucc28\uc9c0\ud55c\ub2e4. struct thread\ub294 page of memory\uc758 \uc2dc\uc791\ubd80\ud130 \uacf5\uac04\uc744 \ucc28\uc9c0\ud55c\ub2e4. page\uc758 \ub098\uba38\uc9c0 \ubd80\ubd84\uc740 thread\uc758 stack\uc744 \uc704\ud574 \uc774\uc6a9\ub418\ub294\ub370, \uc774\ub294 end of the page\ub85c\ubd80\ud130 \uc544\ub798\ucabd \ubc29\ud5a5\uc73c\ub85c \ub0b4\ub824\uac00\uba70 \uc9c4\ud589\ub41c\ub2e4.<\/p>\n<p>\ub530\ub77c\uc11c kernel stack\uc744 \uc704\ud55c \uacf5\uac04\uc744 \uc704\ud574 struct thread\ub294 \ub108\ubb34 \ud06c\uae30\uac00 \ud06c\uba74 \uc548 \ub41c\ub2e4. base struct thread\ub294 1kB \ubbf8\ub9cc\uc774\uc5b4\uc57c \ud55c\ub2e4. \uadf8\ub9ac\uace0 kernel stack\ub3c4 \ub108\ubb34 \ud06c\uba74 \uc548 \ub41c\ub2e4. stack\uc5d0\uc11c overflow\uac00 \ubc1c\uc0dd\ud558\uba74 thread state\ub97c \uce68\ubc94\ud560 \uac83\uc774\ubbc0\ub85c kernel function\uc740 struct\uc640 array\uc5d0 non-static local variable \uac19\uc774 \ub108\ubb34 \ub9ce\uc740 \uacf5\uac04\uc744 \ud560\ub2f9\ud558\uc9c0 \uc54a\uace0, malloc()\uc774\ub098 palloc_get_page() \uac19\uc740 \ub3d9\uc801 \ud560\ub2f9 function\uc744 \uc368\uc57c \ud55c\ub2e4.<br \/>\n[Member of struct thread]<br \/>\ntid_t tid<br \/>\nthread identifier\ub97c \ub73b\ud55c\ub2e4. \uac01 thread\ub97c \ubd84\uac04\ud55c\ub2e4. \ud604\uc7ac\ub294 int \uc790\ub8cc\ud615\uc5d0 1\ubd80\ud130 numbering\ub418\uac8c\ub054 \uc9dc\uc5ec\uc838 \uc788\ub2e4.<\/p>\n<p>\ucd9c\ucc98 : <a href=\"https:\/\/www.happycampus.com\/report-doc\/30007221\/\" target=\"_blank\">\ud574\ud53c\ucea0\ud37c\uc2a4<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubaa9\ucc28 0. analysis 0.1. thread 0.1.1. struct thread 0.1.2. thread functions &#8211; [thread \uc2dc\uc791 \uad00\ub828 function] &#8211; [thread \uad00\ub9ac function] &#8211; [thread \ub3d9\uc791 \uad00\ub828 function] &#8211; [scheduling function] &#8211; [timer \uad00\ub828 function] 0.1.3. list &#8211; [list function] 0.1.4. how to switch thread 0.2. synchronization 0.2.1. meaning of synchronization 0.2.2. disabling interrupts 0.2.2.1. meaning of disabling [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12085,50864,50867,50862,50866,50865,1833,16377,50863],"class_list":["post-41552","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-acarbose","tag-alarm-clock","tag-busy-waiting","tag-pintos","tag-scheduling","tag-thread","tag-1833","tag-16377","tag-50863"],"_links":{"self":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/posts\/41552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/comments?post=41552"}],"version-history":[{"count":0,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/posts\/41552\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/media?parent=41552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/categories?post=41552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/tags?post=41552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}