YK
← Posts

[WEEK 9] Pintos - Threads

2026-04-30

This week, I finally started the highly anticipated Pintos project. The learning keywords were: threads, synchronization, priority scheduling, priority inversion, and MLFQS (Multi Level Queue Scheduling).

I decided to completely exclude AI from both my learning and implementation processes this week. Normally, I aggressively use AI to speed up my learning, but I wanted to challenge myself with a traditional approach. I didn't even Google anything and relied solely on my peers' guidance and the KAIST gitbook.

Implementing without AI definitely gave me a lot of debugging practice, but I realized that AI is essential for balancing theory and implementation. Trying to grasp the architecture and implement it just by reading the massive codebase and manual was near impossible; I barely managed it thanks to my peers' help. As a result, I only completed threads, synchronization, and priority scheduling this week. I plan to ponder the remaining topics on my own later. Peer learning and pair programming are great, but without foundational knowledge to act as a guide, things often fall apart. Therefore, next week, I plan to actively use AI again during the learning phase to specify my objectives as much as possible.

Working on Pintos gave me practice coding within a massive codebase. When reviewing the internal structure, I didn't pay much attention to the doubly linked list, thinking I could just skim over it. However, failing to understand the specific characteristics of this implemented list led to issues. When dealing with two lists, I needed to pop the list element first before pushing it into the other. Instead, treating it like an abstracted list in Python, I pushed the element into the new list first and then tried to pop it from the original list, which caused an error. Seeing how a simple function call order could determine a pass or fail made me realize the need for a much more meticulous approach.

Additionally, I used printf() inside the sema_up() function for debugging, which caused an OS boot failure. It turned out that printf() itself calls sema_up(). Calling it inside sema_up() caused an infinite recursion, leading to continuous timeouts. This taught me that when unexpected issues arise despite having flawless logic, I need to look much deeper into the internal workings.

Since everyone was solving the same test cases this week, I didn't feel much value in collaboration, and things skewed heavily toward individual learning. Next week, I plan to actively participate in collaboration and properly learn how to utilize Git.