Scheduling parameters out of the kernel.

This commit is contained in:
Cristiano Giuffrida
2010-07-13 15:30:17 +00:00
parent d4e41fd1f6
commit 8cedace2f5
26 changed files with 196 additions and 156 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ INCS+= minix/a.out.h minix/bitmap.h minix/callnr.h minix/cdrom.h \
minix/fslib.h minix/ioctl.h minix/ipc.h minix/ipcconst.h \
minix/keymap.h minix/minlib.h minix/mq.h \
minix/netdriver.h minix/partition.h minix/paths.h \
minix/portio.h minix/profile.h minix/queryparam.h \
minix/portio.h minix/priv.h minix/profile.h minix/queryparam.h \
minix/rs.h minix/safecopies.h minix/sched.h minix/sef.h minix/sound.h \
minix/spin.h minix/sys_config.h minix/sysinfo.h minix/syslib.h \
minix/sysutil.h minix/timers.h minix/tty.h minix/type.h minix/types.h \
+4 -2
View File
@@ -668,12 +668,14 @@
#define SYS_STATE_CLEAR_IPC_REFS 1 /* clear IPC references */
/* Subfunctions for SYS_SCHEDCTL */
#define SCHEDCTL_FLAGS m1_i1 /* flags for setting the scheduler */
#define SCHEDCTL_FLAGS m9_l1 /* flags for setting the scheduler */
# define SCHEDCTL_FLAG_KERNEL 1 /* mark kernel scheduler and remove
* RTS_NO_QUANTUM; otherwise caller is
* marked scheduler
*/
#define SCHEDCTL_ENDPOINT m1_i2 /* endpt of process to be scheduled */
#define SCHEDCTL_ENDPOINT m9_l2 /* endpt of process to be scheduled */
#define SCHEDCTL_QUANTUM m9_l3 /* current scheduling quantum */
#define SCHEDCTL_PRIORITY m9_s4 /* current scheduling priority */
/*===========================================================================*
* Messages for the Reincarnation Server *
+22
View File
@@ -63,6 +63,28 @@
/* This feature enable the counting of system calls in PM and FS */
#define ENABLE_SYSCALL_STATS 0
/* Max. number of I/O ranges that can be assigned to a process */
#define NR_IO_RANGE 64
/* Max. number of device memory ranges that can be assigned to a process */
#define NR_MEM_RANGE 20
/* Max. number of IRQs that can be assigned to a process */
#define NR_IRQ 8
/* Scheduling priorities. Values must start at zero (highest
* priority) and increment.
*/
#define NR_SCHED_QUEUES 16 /* MUST equal minimum priority + 1 */
#define TASK_Q 0 /* highest, used for kernel tasks */
#define MAX_USER_Q 0 /* highest priority for user processes */
#define USER_Q ((MIN_USER_Q - MAX_USER_Q) / 2 + MAX_USER_Q) /* default
(should correspond to nice 0) */
#define MIN_USER_Q (NR_SCHED_QUEUES - 1) /* minimum priority for user
processes */
/* default scheduling quanta */
#define USER_QUANTUM 200
/*===========================================================================*
* There are no user-settable parameters after this line *
*===========================================================================*/
+24
View File
@@ -0,0 +1,24 @@
/* Privilege-related definitions. */
#ifndef _MINIX_PRIV_H
#define _MINIX_PRIV_H
#include <minix/com.h>
#include <minix/config.h>
/* scheduler */
#define SRV_SCH KERNEL /* system services */
#define DSRV_SCH SCHED_PROC_NR /* dynamic system services */
#define USR_SCH NONE /* user processes */
/* scheduling priority queue. */
#define SRV_Q USER_Q /* system services */
#define DSRV_Q USER_Q /* dynamic system services */
#define USR_Q USER_Q /* user processes */
/* scheduling quantum. */
#define SRV_QT USER_QUANTUM /* system services */
#define DSRV_QT USER_QUANTUM /* dynamic system services */
#define USR_QT USER_QUANTUM /* user processes */
#endif /* _MINIX_PRIV_H */
+2 -1
View File
@@ -45,7 +45,8 @@ _PROTOTYPE( int sys_exit, (void));
_PROTOTYPE( int sys_trace, (int req, endpoint_t proc_ep, long addr, long *data_p));
_PROTOTYPE( int sys_schedule, (endpoint_t proc_ep, unsigned priority, unsigned quantum));
_PROTOTYPE( int sys_schedctl, (unsigned flags, endpoint_t proc_ep));
_PROTOTYPE( int sys_schedctl, (unsigned flags, endpoint_t proc_ep,
unsigned priority, unsigned quantum));
/* Shorthands for sys_runctl() system call. */
#define sys_stop(proc_ep) sys_runctl(proc_ep, RC_STOP, 0)