Time slice, Computer Engineering

The Linux Process Scheduler uses time slice to prevent a single process from using the CPU for too long. A time slice specifies how long the process can use the CPU. In our simulation, the minimum time slice possible is 10ms and the maximum time slice possible is 300 ms. The scheduler assigns higher time slices to processes that are more interactive and lower time slices to processes that are more CPU intensive. Note that time slice is a positive integer in this range [10, 300]. To calculate the time slice, we use this formula:

2160_Time slice.png

Each process is supplied with a priority level that ranks a process based on their worth and need for processor time. The priority levels range from 100 to 140 [100,140]. Processes with a lower priority will run before a process with a higher priority. Process with a lower priority level also receives a longer time slice. A process's initial priority (sometimes called static priority) is calculated based on its nice value. Nice values range from -20 to +19 [-20, 19] indicating how nice the process is. Larger nice values correspond to a lower priority. CPU intensive processes typically have higher nice values while IO bound processes have lower nice values. Nice values are provided with the input file. Note that a priority value is a positive integer in this range

[100,140]. To calculate the initial (or static) priority we use this formula:

2269_Time slice1.png

After a process exhausts its time slice, it will join the expired queue or go back to the active queue. Before doing that, it has to calculate its new priority (sometimes called the dynamic priority). This is the formula used to calculate the dynamic priority:

priority = original priority + bonus:

865_Time slice2.png

Bonus points are given to processes that either use too much or too little CPU time. Bonus points are integers range from -5 to +5 ([-5, 5]). Here are the guidelines to calculating bonus points:

547_Time slice3.png

Note : Here total IO mean the total time spent in the IO queue to this point and total CPU mean the total time spent in the CPU to this point.

Posted Date: 4/3/2013 3:06:20 AM | Location : United States

Related Discussions:- Time slice, Assignment Help, Ask Question on Time slice, Get Answer, Expert's Help, Time slice Discussions

Write discussion on Time slice
Your posts are moderated
Related Questions
Q. Combined Parallel Work-sharing Constructs? Combined parallel work sharing constructs are shortcuts for specifying a work sharing construct nested instantaneously in a parall

Backpropagation: However Backpropagation can be seen as utilising searching a space of network configurations as weights in order to find a configuration with the least error,

What is meant by inferring latches, how to avoid it? Consider the following: always @(s1 or s0 or i0 or i1 or i2 or i3) case ({s1, s0}) 2'd0: out = i0; 2'd1: out =

What is Arithmetic and Logic Unit Arithmetic and Logic Unit: The ALU is the 'core' of any processor. It implements all arithmetic operations (addition, multiplication, subtract

There is a built-in function function known as cellfun that evaluates a function for each element of a cell array.  Make a cell array, then call the cellfun function, passing the h

State the basic properties of this analytical engine The basic properties of this analytical engine are: It was a common purpose programmable machine. It had provisi

Difference between Visual check and Parity check Visual check This is checking for errors by comparing entered data with original document (NOTE: this is not the same as

Q. Explain about wildcard character in DOS? Sometimes you may like to list files having similar names. Let as suppose that these files are present in a root directory of drive

Algorithm to insert a key in B-tree is as follows: 1.  First search is completed for the place where the new record must be put. As the keys are inserted, they are sorted into