Volatile & AtomicityTwo distinct bugs that both look like a variable changing value at random.Electrical EngineeringOne is a compiler problem, the other a timing problem.VolatileTells the compiler the value can changeRequired for hardware registersRequired for variables an ISR writesStops the value being cached in a registerIt is not a concurrency guaranteeAtomicityA multi-byte write can be interruptedRead-modify-write is three operationsDisable interrupts, or use an atomic typeKeep any critical section extremely shortA single flag byte is usually safeVolatile stops the compiler optimising a read away. It does nothing tostop an interrupt landing half-way through a write.Volatile & Atomicitylearnposters.com
Volatile & Atomicity — printable engineering wall chart from LearnPosters. Free vector PDF, US Letter and A4.

What’s on the Volatile & Atomicity poster

10 entries in 2 groups.

One is a compiler problem, the other a timing problem.

Volatile stops the compiler optimising a read away. It does nothing to stop an interrupt landing half-way through a write.

Questions about the Volatile & Atomicity poster

What’s on the Volatile & Atomicity poster?
10 entries in 2 groups. One is a compiler problem, the other a timing problem. Volatile: Tells the compiler the value can change, Required for hardware registers, R…; Atomicity: A multi-byte write can be interrupted, Read-modify-write is three operatio…. Volatile stops the compiler optimising a read away. It does nothing to stop an interrupt landing half-way through a write.
Who is the Volatile & Atomicity poster for?
Volatile & Atomicity belongs to the Electrical Engineering section rather than to a school year, because engineering is not something one grade owns. Anyone learning embedded systems can pin it up — a beginner, a student mid-course, or someone revising years later.
When should you use the Volatile & Atomicity poster?
Read it when a value read in the main loop disagrees with what the ISR just wrote. A wall chart earns its place by being glanceable from where the work is happening, so Volatile & Atomicity belongs on the wall where that engineering work actually happens, within glancing distance, rather than filed away.
What other posters go with Volatile & Atomicity?
ADC Resolution, Driving Loads and GPIO & Pull Resistors sit alongside Volatile & Atomicity in the Electrical Engineering section. Printed together they make a wall rather than a single sheet, which is how a reference set actually gets used.ADC ResolutionDriving LoadsGPIO & Pull Resistors
Is the Volatile & Atomicity poster free to download and print?
Yes. Volatile & Atomicity downloads as a free PDF with no account, no email and no watermark, like everything else in the Electrical Engineering section. Print as many copies as you like for a home, a classroom, a library or a tutoring group; reselling the file is the only thing the licence rules out.Read the licence
What size does the Volatile & Atomicity poster print at?
Volatile & Atomicity is a vector PDF laid out for US Letter, and prints on A4 with Fit to page — the same file, no separate download. Because every mark on it is drawn rather than photographed, it stays sharp enlarged to A3, A2 or A1 at a copy shop. Colour carries emphasis only, so a greyscale print of Volatile & Atomicity loses nothing.Printing guide

Related posters

Charts that sit alongside Volatile & Atomicity on the same wall.

Browse every Electrical Engineering poster, or start from the full catalogue.