int sched_setparam(pid_t pid, const struct sched_param *p);
int sched_getparam(pid_t pid, struct sched_param *p);
int sched_priority; ... }; sched_setparam Àº ½ºÄÉÁÙ¸µ ¸Å°³ º¯¼ö¸¦ pid¿¡ ÀÇÇØ ÀνĵǴ ÇÁ·Î¼¼½º¸¦ À§ÇØ ½ºÄÉÁÙ¸µ Á¤Ã¥°ú °ü·ÃÇؼ ¼³Á¤ÇÑ´Ù. pid °¡ 0À̸é ÇöÁ¦ ÇÁ·Î¼¼½ºÀÇ ¸Å°³ º¯¼öµéÀÌ ¼³Á¤µÈ´Ù. ¸Å°³ º¯¼ö pÀÇ Çؼ®Àº ¼±ÅÃµÈ Á¤Ã¥¿¡ ´Þ·È´Ù. ÇöÀç, ¾Æ·¡ ¼¼°¡Áö ½ºÄÉÁÙ¸µ Á¤Ã¥ÀÌ ¸®´ª½º¿¡¼ Áö¿øµÈ´Ù: SCHED_FIFO, SCHED_RR, ¿Í SCHED_OTHER. sched_getparam ´Â pid ·Î ±¸ºÐµÇ´Â ÇÁ·Î¼¼½º¸¦ À§ÇØ ½ºÄÉÁÙ¸µ ¸Å°³ º¯¼ö¸¦ °Ë»öÇÑ´Ù. pid °¡ 0À̸é, ÇöÀç ÇÁ·Î¼¼½ºÀÇ ¸Å°³ º¯¼ö´Â °Ë»öµÈ´Ù. sched_setparam ´Â ÇÁ·Î¼¼½ºÀÇ ½ºÄÉÁÙ¸µ Á¤Ã¥À» À§ÇØ pÀÇ À¯È¿¼ºÀ» È®ÀÎÇÑ´Ù. ¸Å°³ º¯¼öp->sched_priority´Â ¹Ýµå½Ã sched_get_priority_min¿Í sched_get_priority_max¿¡ ÀÇÇØ ÁÖ¾îÁø ¹üÀ§ ¾È¿¡ ÀÖ¾î¾ß ÇÑ´Ù. sched_setparam ¿Í sched_getparam ÀÌ °¡´ÉÇÑ POSIX ½Ã½ºÅÛÀº <unistd.h>¾È¿¡ _POSIX_PRIORITY_SCHEDULING ¸¦ ±ÔÁ¤ÇÑ´Ù.
sched_setscheduler(2) has a description of the Linux scheduling scheme.
Programming for the real world - POSIX.4
by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0
IEEE Std 1003.1b-1993
(POSIX.1b standard)
ISO/IEC 9945-1:1996