{"id":40562,"date":"2026-05-16T09:01:23","date_gmt":"2026-05-16T00:01:23","guid":{"rendered":"https:\/\/blog.agentsoft.co.kr\/index.php\/2026\/05\/16\/40562\/"},"modified":"2026-05-16T09:01:23","modified_gmt":"2026-05-16T00:01:23","slug":"pintos-project-2-final-report-user-program-system-call","status":"publish","type":"post","link":"https:\/\/blog.agentsoft.co.kr\/index.php\/2026\/05\/16\/40562\/","title":{"rendered":"Pintos Project 2 final report &#8211; User Program, System Call"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image4.happycampus.com\/Production\/thumbnail\/2024\/06\/10\/data29981843-0001.jpg\"><img decoding=\"async\" src=\"https:\/\/image4.happycampus.com\/Production\/thumbnail\/2024\/06\/10\/data29981843-0002.jpg\"><\/p>\n<p><strong>\ubaa9\ucc28<\/strong><\/p>\n<p>1. Process termination message<br \/>\n1.1. algorithm<br \/>\n1.2. function<\/p>\n<p>2. Argument passing<\/p>\n<p>3. System calls for user process<br \/>\n3.1. algorithm<br \/>\n3.2. data structure<br \/>\n3.3. function<\/p>\n<p>4. System calls for file manipulation<br \/>\n4.1. algorithm<br \/>\n4.2. data structure<br \/>\n4.3. function<\/p>\n<p>5. denying writes<br \/>\n5.1. algorithm<br \/>\n5.2. function<\/p>\n<p>6. discussion<br \/>\n6.1. argument passing \uc624\ub958<br \/>\n6.2. bad test \uc624\ub958<br \/>\n6.3. multi-oom \uc624\ub958<br \/>\n6.4. \uacb0\uacfc<\/p>\n<p><strong>\ubcf8\ubb38\ub0b4\uc6a9<\/strong><\/p>\n<p>1. Process termination message<br \/>\nprocess\uac00 \uc885\ub8cc\ub420 \ub54c\ub9c8\ub2e4 process \uc885\ub8cc \uba54\uc138\uc9c0\ub97c \ub744\uc6cc\uc57c \ud55c\ub2e4.<br \/>\n\uc885\ub8cc \uba54\uc138\uc9c0\uc758 \ucd9c\ub825 \uc608\uc2dc\uc640 \ud615\uc2dd\uc740 \uc544\ub798\uc640 \uac19\ub2e4.<br \/>\nprintf(&#8220;%s: exit(%d\\n)&#8221;,variable_1, variable_2)<br \/>\nex) args-single: exit(0)<br \/>\nvariable_1 : process\uc758 \uc774\ub984<br \/>\nvariable_2 : exit code<br \/>\n1.1. algorithm<br \/>\nexit system call\uc744 \ub2f4\ub2f9\ud558\ub294 \ud568\uc218\ub97c \ub9cc\ub4e4\uace0<br \/>\n\ud568\uc218 \uc548\uc5d0\uc11c \ud574\ub2f9 thread\ub97c \uc885\ub8cc\uc2dc\ud0a4\uace0, \uc885\ub8cc \uba54\uc138\uc9c0\ub97c \ucd9c\ub825\ud558\ub3c4\ub85d \ud55c\ub2e4.<br \/>\nprocess\uac00 \uc885\ub8cc\ub420 \ub54c\ub9c8\ub2e4 exit system call\uc744 \ud638\ucd9c\ud55c\ub2e4\uba74<br \/>\n\ud574\ub2f9 thread\ub3c4 \uc885\ub8cc\ub420 \uac83\uc774\uace0, \uc885\ub8cc \uba54\uc138\uc9c0\ub3c4 \ucd9c\ub825\ub420 \uac83\uc774\ub2e4.<br \/>\n1.2. function<br \/>\n\uc6d0\ub798 \uae30\uc874\uc758 pintos\uc5d0\uc11c\ub294<br \/>\n\ud574\ub2f9 \ud30c\uc77c\uc758 load\uc5d0 \uc2e4\ud328\ud55c \uacbd\uc6b0 thread_exit()\uc744 \ud638\ucd9c\ud558\uc600\ub2e4.<br \/>\nstatic void<br \/>\nstart_process (void *file_name_)<\/p>\n<p><\uc911 \ub7b5><\/p>\n<p>2. Argument passing<br \/>\nuser\uc5d0 \uc758\ud574 \uc785\ub825\ub41c command\ub294<br \/>\n\ud504\ub85c\uadf8\ub7a8 \uc774\ub984\uacfc \ud568\uaed8 \ubd80\uc218\uc801\uc73c\ub85c \ubd99\ub294 option\ub4e4\uc774 \ub2e4\uc591\ud558\ubbc0\ub85c<br \/>\n\uc774\ub97c \ubaa8\ub450 \uc778\uc2dd\ud560 \uc218 \uc788\uc5b4\uc57c \ud55c\ub2e4.<br \/>\n\uadf8\ub7ec\ub098 \ud604\uc7ac pintos\ub294<br \/>\ncommand line\uc5d0 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uc600\uc744 \ub54c<br \/>\n\uc785\ub825\ub41c \uba85\ub839\uc5b4 \uc804\uccb4\ub97c \ud558\ub098\uc758 \ud504\ub85c\uadf8\ub7a8 \uc774\ub984\uc73c\ub85c \uc778\uc2dd\ud558\ub3c4\ub85d \uad6c\ud604\ub418\uc5b4 \uc788\uc73c\uba70,<br \/>\n\ud504\ub85c\uadf8\ub7a8 \uc774\ub984\uacfc option\ub4e4\uc744 \uad6c\ubd84\ud558\uc5ec \uc778\uc2dd\ud558\uc9c0 \ubabb\ud558\ub294 \uc0c1\ud0dc\uc774\ub2e4.<br \/>\n\ub530\ub77c\uc11c \uc785\ub825\ub41c command line\uc744<br \/>\n\ud504\ub85c\uadf8\ub7a8 \uc774\ub984\uacfc option\ub4e4\ub85c parsing\ub420 \uc218 \uc788\uac8c \uc218\uc815\ud55c\ub2e4.<\/p>\n<p>\/* userprog\/process.c *\/<br \/>\ntid_t<br \/>\nprocess_execute (const char *file_name)<br \/>\n{<br \/>\nchar *command_line;<br \/>\nchar *name;<br \/>\nchar *remain;<br \/>\ntid_t tid;<br \/>\n\/\/ \uba54\ubaa8\ub9ac \ud560\ub2f9, \uba54\ubaa8\ub9ac \ud560\ub2f9 \uc2e4\ud328\ud55c \uacbd\uc6b0 \ud568\uc218\uc885\ub8cc, file_name\uc744 comman<br \/>\ncommand_line = palloc_get_page (0);<br \/>\nif (command_line == NULL)<br \/>\nreturn TID_ERROR;<br \/>\nstrlcpy (command_line, file_name, PGSIZE);<\/p>\n<p>\ucd9c\ucc98 : <a href=\"https:\/\/www.happycampus.com\/report-doc\/29981843\/\" target=\"_blank\">\ud574\ud53c\ucea0\ud37c\uc2a4<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubaa9\ucc28 1. Process termination message 1.1. algorithm 1.2. function 2. Argument passing 3. System calls for user process 3.1. algorithm 3.2. data structure 3.3. function 4. System calls for file manipulation 4.1. algorithm 4.2. data structure 4.3. function 5. denying writes 5.1. algorithm 5.2. function 6. discussion 6.1. argument passing \uc624\ub958 6.2. bad test \uc624\ub958 [&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,50875,50877,50862,50873,50876,50874,50865,16377,50863],"class_list":["post-40562","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-acarbose","tag-fork","tag-multi-oom","tag-pintos","tag-process-termination","tag-stack","tag-systemcall","tag-thread","tag-16377","tag-50863"],"_links":{"self":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/posts\/40562","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=40562"}],"version-history":[{"count":0,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/posts\/40562\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/media?parent=40562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/categories?post=40562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.agentsoft.co.kr\/index.php\/wp-json\/wp\/v2\/tags?post=40562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}