Zack's Kernel News

Zack's Kernel News

Article from Issue 280/2024

Chronicler Zack Brown reports Opcode life cycles and naming conventions.

Opcode Life Cycles

In the Mariana Trench of Linux kernel development swims the elusive yet luminescent creature, the opcode. Rarely seen by user eyes, the opcode forms the basis of the elaborate computer ecosystem upon which rests the digital life and productivity of our entire planet.

Opcodes exist at the hardware level. They are implemented by the actual AND, OR, and other silicon-based logic gates that exist by the millions on chips that run nearly every CPU in the known universe. Quantum computers, Babbage difference engines, and Antikythera devices are something else again – Linux support coming soon.

Steven Rostedt recently caught a glimpse of the rare and elusive cmpxchg opcode. This opcode compares and then potentially exchanges two values with one another, without allowing anything to interrupt it during the moment between the comparison and the actual data exchange. Ordinarily, in Linux and other multithreaded systems, operations are routinely interrupted by the kernel to provide that smooth and seamless feel of everyone using the system at the same time. The cmpxchg opcode makes this easier by preventing the interruption coming at an inconvenient moment, when the data might be in an inconsistent state. Otherwise, the kernel would have to implement a more complex and robust batch of code to do the same operation safely.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Linus Torvalds Considers Dropping i486 Support

    In a message to the Linux kernel mailing list, creator Linus Torvalds indicates that it's time to jettison support for i486 machines in with Linux kernel.

  • Perl: Perl Debugger

    The Perl interpreter, perl, doesn’t often crash, but if it happens, not even the excellent Perl debugger will be able to help you.

  • Kernel News

    Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

  • Kernel News

    Linux 2.4 Status

    Kernel Insanity at the Highest Levels

    Linux Licensing Constraints

    Kernel Disassembler

  • Security Lessons

    When a test kernel starts wrecking network cards, the community gets busy.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More