我很难理解setscheduler函数中的sched_priority角色。
我使用的是linux 2.4.X,文档中写道:
Valid priorities for SCHED_OTHER is 0, Valid priorities for SCHED_RR\FIFO are 1...MAX_USER_RT_PRIO-1
但是,我记得rt进程的优先级是0-99,SCHED_OTHER的优先级是100-139,所以...我错过了什么?struct sched_param中的sched_priority指的是什么?
是否有一种方法可以使用截止日期调度,同时将cpu关联设置为linux中的进程?我正在运行4.16内核。下面是我的测试代码:
#define _GNU_SOURCE
#include "include/my_sched.h"
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
int main() {
struct sched_attr attr;
int x = 0;
int ret;
unsigned int flags = 0;
l