May 1, 2001 - performance of the scheduler when faced with a larg e number of .... size for the test was largenough for the overhead of. Java garbage ...
May 1, 2001 - Center for Information Technology Integration. University of ... immensely. Java technology is ...... library/tech/00/03/biztech/articles/. 20soft.html.
The scheduling algorithm of traditional Unix operating systems must fulfill several
conflicting ... Understanding the Linux Kernel: Chapter 10: Process Scheduling.
Who am I? 2. Software Developer and Architect at Altera Corporation. â Open Source ... determinism. â Main Wiki - ht
toring the Linux kernel. The next section is dedicated to our Linux kernel module and the output to OTF [1]. Within the third section will show how various VAM-.
Apr 15, 2008 - the RCC layout is less than the cycle time with the IRC layout. Proof: First, let ..... 1273â1292. Sethi, S.P., Sriskandarajah, C., Sorger, G., Blazewicz, J. and Kubiak, W., Sequencing of parts ... Ann. Oper. Res., 1998, 76, 287â32
ucts (materialised in a distributed hierarchically organized computer ... factories have general-purpose production equipment that can perform a wide ... Job shops are gener- .... is in close correlation to the efficiency of all management levels.
starts process number 1, /sbin/init. – /sbin/init is called the “mother of all
processes” in that it is process number 1 in all Unix and Linux systems, and all
other ...
common network service dispatching is based on IP level forwarding [1, 8, 13]. .... processing in IP layer, where the check module of CASS will check whether ...
Key words: scheduling, interactivity, Linux, multilevel feedback queue. ..... We added three simple system calls to the Linux 2.6 kernel that allow us to trace .... the center of the interactivity range where a classification change can occur easily.
able real-time scheduling model[3]. We found that the Unix SCHED SPORADIC scheduling policy is a potential improvement over SCHED FIFO at any constant ...
common network service dispatching is based on IP level forwarding [1, 8, 13]. For content aware scheduling, Pai [12] explored the use of content-based request ...
schedule may consist of a set of routinely planned activities, such as ... of repeating certain activity types (e.g. social recreational) but not all (e.g. return to work).
of operations lead to programs in which the detailed structure of computation can not ..... Overhead includes the work of bookkeeping, communication, and load ...
Page 1 ... ant colonies for the development of optimization solutions. .... uler, which aims to apply Ant Colony Optimization techniques [7] to schedule pro-.
Round robin process scheduling algorithm has high process switch rates and .... Prakash, N. and Sharma, H. (2010), âAn Improved Round Robin Scheduling.
Operating system process scheduling has been an ... system process management on on-chip caches. ..... [9] James R Larus, Micheal Parkes, âUsing Cohort.
2German-Jordanian University, Industrial Engineering Department, Amman, Jordan. {safwan.altarazi .... operational tolerance-manufacturing cost and the WIP inventory. .... the starting time of the processing of operation Ojil on process plan l.
Y123 = 1. On the other hand, if it specifies that Task 1 not to be performed in Unit 2 at time slot 3, the additional constraint is then Y123 = 0. If a new solution is ...
are executed at the desired rate and, (b) the entire process receives a guaranteed share of the CPU over a finite window of time. For example, a video server.
Planning the activities necessary to run an airline is a complex task. The process of ... MEP market evaluation problem. MSeP market selection problem. ASeP.
software programs in project management. Furthermore, we investigate how PSL could be utilized to reason about potential conflicts and to perform consistency ...
scheduling allows more flexibility in production and thus gives ... This paper focuses on the process-planning and scheduling needs of a mould ... efficient schedules from a wider search space. ... chant argued that NLPP and other approaches integrat
constraints. In this paper, we investigate how to plan the business process in- stances scheduling in accordance with resource availability patterns, so that.
Linux uses dynamically assigned process priorities for non real-time processes.
Processes ... Examine INIT TASK macro in include/linux/sched.h header file.
'
$
Process Scheduling in Linux • Scheduling Mechanism: how to switch. • Scheduling Policy: when to switch and what process to choose. Some scheduling objectives: – fast process response time – avoidance of process starvation – good throughput for background jobs – support for soft real time processes • Linux uses dynamically assigned process priorities for non real-time processes. Processes running for a long time have their priorities decreased while processes that are waiting have their priorities increased dynamically.
&
%
'
$
Classification of Processes • Compute-bound versus I/O bound. Linux implicitly favors I/O bound processes over compute bound processes (why?). • Another classification: – Interactive processes. Examples: shells, text editors, GUI applications. – Batch processes. Examples: compilers, database search engine, web server, number-crunching. – Real-time processes. audio/video applications, data-collection from physical sensors, robot controllers.
&
%
'
$
Process States in Linux There are five process states defined in /usr/include/linux/sched.h. #define #define #define #define #define
Scheduling Parameters • Processes are preemptible in user mode but not in kernel mode. • How long is a quantum? Examine INIT TASK macro in include/linux/sched.h header file. All processes inherit the default quantum value via fork from the init task. #define DEF_COUNTER (10*HZ/100) /* 100 ms time slice */ #define MAX_COUNTER (20*HZ/100) #define DEF_NICE (0) • Processes have two types of priorities: – Static priority. Between 1 and 99. Used by real-time processes. – Dynamic priority. For non real-time processes. Sum of the base time quantum and of the number of ticks of CPU time left to the process before its quantum expiers in the current epoch.
&
%
'
$
Data Structures Used by Scheduler From the task struct in include/linux/sched.h. struct task_struct { ... volatile long need_resched; ... long counter; long nice; // replaces the priority variable in earlier kernel unsigned long policy; //SCHED_OTHER, SCHED_FIFO, SCHED_RR ... int has_cpu, processor; unsigned long cpus_allowed; ... unsigned long rt_priority; ... }
&
%
'
$
Passing quantums after fork() From the do fork(...) function in kernel/fork.c. // from do_fork in kernel/fork.c (different from the textbook) p->counter = (current->counter + 1) >> 1; current->counter >>= 1; if (!current->counter) current->need_resched = 1;
• The number of ticks left to the parent is split in two halves, one for the parent, one for the child. This prevents processes from getting an unlimited amount of CPU time.
&
%
'
$
Invoking the scheduler The scheduler proper is the function schedule() in kernel/sched.c. • Direct Invocation. Examples: A process must be blocked because a resource is not available, a device driver can invoke schedule() directly if it will be executing a long iterative task. • Lazy Invocation. By setting the need resched flag field of current to 1. Examples: – When current has use up its quantum of CPU time (done by update process times function in kernel/timer.c) – When a process is woken up and its priority is higher than that of the current process. – When a setscheduler() or sched yield() system call is issued.
&
%
'
$
Goodness of a Process This is the function that decides how desirable a process is.. You can weigh different processes against each other depending on what CPU they’ve run on lately etc to try to handle cache and TLB miss penalties. Return values: • -1000: never select this • 0: out of time, recalculate counters (but it might still be selected) • +ve: “goodness” value (the larger, the better) • +1000: realtime process, select this.
&
%
'
$
Actions performed by schedule() • treat current process • select process • switch process
&
%
'
$
Linux SMP scheduler • Each cpu runs the schdule function on its own and communicate via shared data structures. /* * We align per-CPU scheduling data on cacheline boundaries, * to prevent cacheline ping-pong. */ static union { struct schedule_data { struct task_struct * curr; cycles_t last_schedule; } schedule_data; char __pad [SMP_CACHE_BYTES]; } aligned_data [NR_CPUS] __cacheline_aligned = { {{&init_task,0}}}; • Processor affinity is implemented through extra goodness for staying on the same cpu. &
%
'
$
Performance of Linux Scheduler • The scheduling algorithm does not scale well. • The predefined quantum is too large for high system loads. • I/O bound process priority boosting is not optimal. • Support for real-time applications is weak. Several attempts have been made to provide alternate schedulers. An interesting tool called Lockmeter is available to study performance of SMP scheduling.
&
%
'
$
System Calls Related to Scheduling Name nice() getpriority() setpriority() sched getscheduler() sched setscheduler() sched getparam() sched setparam() sched yield() sched get priority min() sched get priority max() sched rr get interval() &