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

Java, what is java?

what is java?

Illustrate the full form of ooa, Illustrate the Full form of OOA OOA vi...

Illustrate the Full form of OOA OOA views the world as objects consist of data structures and events that trigger operations and behaviours, for object behaviour changes. The b

Explain function of network layer in tcp/ip protocol stack, Explain about t...

Explain about the function of network layer briefly in TCP/IP protocol stack. Internetwork Layer: The best-called TCP/IP protocol at internetwork layer is Internet Protoc

What is throughput?, If the throughput scales upward as time progresses and...

If the throughput scales upward as time progresses and the number of Vusers enhance, this showing that the bandwidth is sufficient. If the graph were to remain relatively flat as t

Name the modes of 8255 programmable peripheral interface, What are the diff...

What are the different modes in that 8255 Programmable Peripheral Interface (PPI) can operate?  24 I/O lines in 3-8-bit port groups - A, B, C A, B can be 8-bit input

Example of circuit switching & stored and forward switching, Example of cir...

Example of circuit switching and S&F (Stored and Forward) switching is (A) Telephone and Post of Telegraph (B) Video Signal Post or Telegraph (C)  Digital Signal P

Explain the meaning of accept socket primitive, Explain the meaning of A...

Explain the meaning of ACCEPT socket primitive. The Accept Primitive: A server which uses connection-oriented transport should call procedure accepts to accept

Depth first search - artificial intelligence, Depth First Search - artifici...

Depth First Search - artificial intelligence: Depth first search is very similar to breadth first, except for that the things are added to the top of this agenda rather than o

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