← LessonsBUILDER PATH Β· 7–9πŸ”‘

Oasis One-Key Well

LESSON 115
🎯 Today's missions
πŸͺπŸ”‘πŸŒ΄
DESERT OASIS

Oasis One-Key Well

Two caravans reached the last water jug at once! Build a one-key well keeper so shared supplies can never be changed by two workers together.

🧠 Before we start

In the movie studio, your undo stack allowed one newest edit at a time. Today, a mutex is a one-owner key. It guards a critical sectionβ€”the short, shared job that only one worker may do safely.

πŸ™‹ Ask for keyβ†’πŸ”‘ One ownerβ†’πŸͺ£ Change supply→↩️ Return key
Challenge 1 of 4Build the one-key rule
1

Arrange the well protocol

Tap five visual instruction cards in the safe order. The key must surround the shared water update.

MY MUTEX PROTOCOL
1 Β· WAIT
2 Β· LOCK
3 Β· READ
4 Β· UPDATE
5 Β· RELEASE

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨