SCHED_SETPARAM

Section: Linux Programmer's Manual (2)
Updated: 1996-04-10
Index
Return to Main Contents
 

À̸§

sched_setparam, sched_getparam - ½ºÄÉÁÙ¸µ ¸Å°³ º¯¼öÀÇ ¼³Á¤°ú ¼ÒÀ¯  

»ç¿ë¹ý

#include <sched.h>

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_setparam ¿Í sched_getparam Àº 0À» ¹ÝȯÇÑ´Ù.. ¿¡·¯ ½Ã, -1ÀÌ ¹ÝȯµÇ°í, errno ´Â ÀûÀýÈ÷ ¼³Á¤µÈ´Ù.  

¿¡·¯

ESRCH
ID°¡ pidÀÎ ÇÁ·Î¼¼½º¸¦ ãÀ» ¼ö ¾ø´Ù.
EPERM
È£ÃâÇÏ´Â ÇÁ·Î¼¼½º°¡ ±ÇÇÑÀ» °¡Áú ¼ö ¾ø´Ù. sched_setparam À» È£ÃâÇÏ´Â ÇÁ·Î¼¼½º´Â pid ·Î ºÐ·ùµÇ´Â ÇÁ·Î¼¼½ºÀÇ euid³ª uid¿Í °°Àº È¿°úÀûÀÎ uid°¡ ÇÊ¿äÇϴ٠ȤÀº ½´ÆÛÀ¯Àú ÇÁ·Î¼¼½º ¿©¾ß¸¸ ÇÑ´Ù..
EINVAL
¸Å°³ º¯¼ö p°¡ ÇöÁ¦ ½ºÄÉÁÙ¸µ Á¤Ã¥¿¡ ¸ÂÁö ¾Ê´Â´Ù.
 

ȣȯ

POSIX.1b (formerly POSIX.4)  

°ü·Ã Ç׸ñ

sched_setscheduler(2), sched_getscheduler(2), sched_get_priority_max(2), sched_get_priority_min(2), nice(2), setpriority(2), getpriority(2),

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  

¿ªÀÚ

ASPLINUX<man@asp-linux.co.kr>, 2000³â 7¿ù 28ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¹Ýȯ°ª
¿¡·¯
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

This document was created by man2html, using the manual pages.
Time: 08:07:00 GMT, March 25, 2004