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

Define lazy swapper, Define lazy swapper.  Rather than swapping the who...

Define lazy swapper.  Rather than swapping the whole process into main memory, a lazy swapper is used. A lazy swapper never swaps a page into memory unless that page will be re

What is locality of reference, What is locality of reference? Analysis ...

What is locality of reference? Analysis of program represents that many instructions ion localized areas of the program are implemented repeatedly during some time period, and

What is secondary storage systems, There are various limitations of primary...

There are various limitations of primary memory like limited capacity which is its not enough to store a very large volume of data and volatility which is when power is turned off

Draw the logic diagram of 4-bit odd parity checkers, Normal 0 f...

Normal 0 false false false EN-IN X-NONE X-NONE

What is a modem, What is a Modem? Modems are fundamentally used to int...

What is a Modem? Modems are fundamentally used to interface digital circuits to transmit information on analogue channels as telephone systems. Modem is from modulator-demodul

What is the difference between a structure and a table, What is the differe...

What is the difference between a structure and a table? Structures are constructed the almost the similar way as tables, the only dissimilarity using that no database table is

DoDAF OV-2 for a green datacenter, How do I create a DoDAF OV-2 for the con...

How do I create a DoDAF OV-2 for the construction of a green data center?

Applications of linked list, What are the Applications of Linked List are ...

What are the Applications of Linked List are a) Fixed block storage allocation b) garbage collection

Define about the objects, Define about the Objects The object notation...

Define about the Objects The object notation is the same in basic form as that for a class. There are three differences among the notations, these are given below: With

Data base, why to learn data base?

why to learn data base?

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