Linux's "scheduler" is the component of Linux (or other kernels) which decides which programs are currently running on your computer at any given time.
From what I recall of it's code there are multiple schedulers (including ones for timers & deadlines), each of which falls back to the next one when they have no active tasks to schedule. Ultimately falling back to a thread which predicts how long it'll lack work, and what the most energy efficient "sleep" instruction would be.
To implement a min heap you build a binary tree where each "branch" holds a value smaller than either of it's children. Then store it in an array where index "i" has children 2i & 2i+1.
Add a value, first place it at the end of the array. Then swap it with it's parent until the invariant is reasserted.
To remove the smallest value (which is at the root), replace it with the last value removed from the end of the array and swap it with a child until the invariant is reasserted.
For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).