Могу посоветовать это:
art-linux.sourceforge.net/
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
#include <linux/art_task.h>
#define TRUE 1
#define KBD_PORT 0x61
#define SPK_BIT 0x02
main(int argc, char *argv[])
{
int temp, hz, i;
hz = atoi(argv[1]);
ioperm(KBD_PORT, 1, TRUE);
art_enter(ART_PRIO_MAX, ART_TASK_PERIODIC, 500000 / hz);
for (i = 0; i < hz * 5; ++i) {
art_wait();
temp = inb(KBD_PORT);
temp = (i & 1) ? temp | SPK_BIT : temp & ~SPK_BIT;
outb(temp, KBD_PORT);
}
art_exit();
}
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/art_task.h>
int main(int argc, char *argv[])
{
art_prio_t prio;
if (argc < 3 || (prio = atoi(argv[1])) < ART_PRIO_MIN ||
prio > ART_PRIO_MAX) {
fprintf(stderr, "usage: %s prio file arg .../n", argv[0]);
return -1;
}
if (art_enter(prio, ART_TASK_RR, 0) == -1) {
perror("art_enter");
return -1;
}
if (execvp(argv[2], &argv[2]) == -1) {
perror("execvp");
return -1;
}
return 0;
}