LWN Articles About Linux, Zephyr, and Rules
-
Heuristics for software-interrupt processing
The kernel's software-interrupt ("softirq") mechanism was added prior to the 1.0 kernel release, but it implements a design seen in systems that were already old when Linux was born. For much of that time, softirqs have been an impediment to the kernel community's scalability and response-time goals, but they have proved resistant to removal. A recent discussion on a proposed new heuristic to mitigate a softirq-related performance problem may have reinvigorated interest in doing something about this subsystem as a whole rather than just tweaking the parameters of how it operates.
Hardware interrupts are generated when some component of the system needs the CPU's attention to, for example, deal with a completed I/O operation. The processing of hardware interrupts is one of the highest-priority tasks in the kernel; an interrupt will preempt almost anything else that might be running, so the amount of work done in interrupt handlers must be kept to a minimum to avoid adversely affecting the rest of the system. The softirq mechanism was designed to allow hardware-interrupt handlers to set aside work to be done urgently — but not quite as urgently as hardware-interrupt processing.
-
An EEVDF CPU scheduler for Linux
The kernel's completely fair scheduler (CFS) has the job of managing the allocation of CPU time for most of the processes running on most Linux systems. CFS was merged for the 2.6.23 release in 2007 and has, with numerous ongoing tweaks, handled the job reasonably well ever since. CFS is not perfect, though, and there are some situations it does not handle as well as it should. The EEVDF scheduler, posted by Peter Zijlstra, offers the possibility of improving on CFS while reducing its dependence on often-fragile heuristics.
-
Zephyr: a modular OS for resource-constrained devices
Writing applications for devices with a lot of resource constraints, such as a small amount of RAM or no memory-management unit (MMU), poses some challenges. Running a Linux distribution often isn't an option on these devices, but there are operating systems that try to bridge the gap between running a Linux distribution and using bare-metal development. One of these is Zephyr, a real-time operating system (RTOS) launched by the Linux Foundation in 2016. LWN looked in on Zephyr at its four-year anniversary as well. Seven years after its announcement, Zephyr has made lots of progress and now has an active ecosystem surrounding it.
Zephyr is an RTOS for connected, resource-constrained devices, such as Internet of Things (IoT) sensors, Bluetooth trackers, heart rate monitors, smartwatches, and embedded controllers. A typical device running Zephyr has a microcontroller with a clock frequency below 100MHz, no MMU, 32KB to 256KB of static RAM, and 512KB or less of on-chip flash memory.
-
Rules as code for more responsive governance
Using rules as code to help bridge the gaps between policy creation, its implementation, and its, often unintended, effects on people was the subject of a talk by Pia Andrews on the first day of the inaugural Everything Open conference in Melbourne, Australia. She has long been exploring the space of open government, and her talk was a report on what she and others have been working on over the last seven years. Everything Open is the successor to the long-running, well-regarded linux.conf.au (LCA); Andrews (then Pia Waugh) gave the opening keynote at LCA 2017 in Hobart, Tasmania, and helped organize the 2007 event in Sydney.
Andrews said that she has a dream of a world where government policy is built in a way that is accountable, participatory, humane, adaptive, and accessible. Those who are affected by these policies should be able to easily understand, apply, and question them; policies should not be written in some ivory tower, but should be created in conjunction with those who must follow them. She dreams of policies that are based on human values, rather than only on what is good for the economy, since relying solely on the latter has not worked out so well, she said; "make what's good for people and then the economy will follow". Rather than just writing policy once and "throwing it out in the ether and hoping", it should be iterated upon, so that even bad policy has a chance to become good based on looking at its actual impact on people. That description of her public-policy dream was met with a good bit of applause.