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
How adaptive transmission helps TCP to maximize throughput on each connection? To know how adaptive retransmission helps TCP maximize throughput upon all connection, see a case

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict

What do you mean by data warehousing? Data warehouse implies as: a) It is subject oriented b) It is integrated and c) It is time variant d) It is non-volatile colle

Determine the uses of Smart cardsĀ  These comprise embedded microchips and receive power from the card readers; Microchip is made up of RAM, ROM and 16-bit processor and the st

Q. Describe about Sole Access Protocol? The atomic operations that have conflicts are handled with the help of sole access protocol. The method used for synchronization in this

Q. Write a program to perform multiplication of two numbers in specified radix. Check that entered numbers are in specified radix or not else error message should be displayed.

Algorithmic Complexity theory: Moreover a similar situation occurs in broad to specific ILP systems when the inference rules are deductive thus they specialize. So at some sta

Q. Explain types of Micro-instructions? In general micro-instruction can be classifiedin two general kinds. These are non-branching and branching. After execution of a non-bran

Design a 32:1 multiplexer using two 16:1 multiplexers and a 2:1 multiplexer Ans. Design a 32 X 1 MUX by using two 16 X 1 MUX and one 2 X 1. Now here total 32 input lines

Q. Rank the list elements in terms of distance? Rank the list elements in terms of distance from each to last element in given linear linked list. A parallel algorithm for t