posted by bluelimn 2017.06.12 17:14

Original link : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/1.2/html/Realtime_Reference_Guide/sect-Realtime_Reference_Guide-Using_library_calls_to_set_priority-sched_get_priority_min_and_sched_get_priority_max.html


#include <stdio.h>
#include <unistd.h>
#include <sched.h>

main()
{


  printf("Valid priority range for SCHED_OTHER: %d - %d\n",
  sched_get_priority_min(SCHED_OTHER),
  sched_get_priority_max(SCHED_OTHER));

  printf("Valid priority range for SCHED_FIFO: %d - %d\n",
  sched_get_priority_min(SCHED_FIFO),
  sched_get_priority_max(SCHED_FIFO));

  printf("Valid priority range for SCHED_RR: %d - %d\n",
  sched_get_priority_min(SCHED_RR),
  sched_get_priority_max(SCHED_RR));
}


Output

Valid priority range for SCHED_OTHER: 0 - 0

Valid priority range for SCHED_FIFO: 1 - 99

Valid priority range for SCHED_RR: 1 - 99



'Programming > linux왕초보' 카테고리의 다른 글

ssh사용 시 diffie-hellman-group1-sha1 관련  (0) 2018.01.30
pthread min, max priority on linux  (0) 2017.06.12
use vim like as source insight  (0) 2016.04.06
[ubuntu] change default shell  (0) 2016.03.22
GDB를 사용한 CORE 파일의 분석  (0) 2016.02.05
kernel make menuconfig error  (0) 2016.01.21
Caching your GitHub password in Git  (0) 2016.01.08
Serial ports usage on Linux  (0) 2016.01.08
process 종료  (0) 2015.05.28
fork  (0) 2015.05.26
Linux SSD 최적화  (0) 2015.04.17