The project
An operating-systems project exploring lightweight threads in the resource-constrained 8051 environment. The work involved low-level C with SDCC, register preservation, timer-driven scheduling, semaphores and producer-consumer synchronization.
What needed solving?
How can independent threads safely share a tiny embedded processor and constrained memory?
Engineering approach
- Implement threading primitives and context-switching behavior.
- Preserve processor state across thread transitions.
- Coordinate concurrent tasks with semaphores and a producer-consumer scenario.
Highlights & results
- Thread creation, yield and termination
- Context-switching and register preservation
- Timer-driven scheduling
- Semaphore and producer-consumer coordination
Lessons learned
Operating-system abstractions become much clearer when the scheduling and synchronization mechanisms are implemented close to the hardware.