Time slice, Computer Engineering

Assignment Help:

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.


Related Discussions:- Time slice

Determine the performance of a parallel algorithm, Q. Determine the perform...

Q. Determine the performance of a parallel algorithm? One more method of determining the performance of a parallel algorithm can be performed after calculating a parameter know

Explain the role of a bus arbiter in a multiprocessor, Explain the role of ...

Explain the role of a bus arbiter in a multiprocessor configuration. Bus arbiter: Which functions to resolve priority between bus masters and allows only one device at a time t

Explain the features of major scheduling algorithms, Explain the Features o...

Explain the Features of Major scheduling algorithms. The Features of Major scheduling algorithms is given below: FCFS - i.e. First come first served scheduli

the bias and standard error , A random variable (X) is modelled as an expo...

A random variable (X) is modelled as an exponentially distributed with mean 30 units. Simulate N = 50 samples from this distribution, and every sample must have m = 20 simulated va

Face recognition using java, how we get a perfect tutorial for face recogn...

how we get a perfect tutorial for face recognition using java

Which of the logic gates are known as universal gates, Which of the logic g...

Which of the logic gates are known as universal gates ? Ans. NAND and NOR are termed as universal gates, since any digital circuit can be realized completely by using either of

Memory system considerations - computer architecture, Synchronized with a c...

Synchronized with a clock signal Memory system considerations Speed Cost Size of chip Power dissipation Memory controller Refresh Overhead

Tag do you use to add a hyperlink column to the DataGrid, What tag do you u...

What tag do you use to add a hyperlink column to the DataGrid?   Anchor tag is used to add a hyperlink column to the data grid

Software, is c++ is language or any software

is c++ is language or any software

What are different types of verilog simulators, What are Different types of...

What are Different types of Verilog Simulators? There are essentially two types of simulators available. -  Event Driven -  Cycle Based

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd