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

Discuss the advantages of expression tree, Discuss its advantages over the ...

Discuss its advantages over the other evaluation techniques. The expression tree is determined by using a post-order traversal of the expression tree as given here: 1. If such

What is object repository, Object Repository means not a set of objects. ...

Object Repository means not a set of objects. It's a common repository for all the people (Testing, Developers) for seeing all the data in one Login. For example QA needs

Datastructure, deque insertion and deletion ..

deque insertion and deletion ..

What is the motivation for cell design, Question: a) Evary cell in a ce...

Question: a) Evary cell in a cellular network is assigned a band of frequencies. The allocated frequencies are divided into two types of channels. Indentify and describe each t

Assembler directives, Assembler directives: An assembler directive is ...

Assembler directives: An assembler directive is a statement to give direction to the assembler to perform the task of assembly process. Assembler directives control organizati

Explain about wide area network, Q. Explain about Wide Area Network? Wi...

Q. Explain about Wide Area Network? Wide Area Network (WAN) usually refers to a network, which covers a large geographical area as well as use communications subnets (circuits)

Describe the roles of association, Describe the roles of association No...

Describe the roles of association Note that each association has roles. For instance, in Figure we can see that two classes, Student and University, have their predefined roles

Illustrate the advantages of register transfer, Register Transfer We as...

Register Transfer We assign computer registers by capital letters to denote function of the register. Such as, the register which holds an address for memory unit is usually

What are the 2 other types of views, What are the 2 other types of Views, w...

What are the 2 other types of Views, which are not allowed in Release 3.0? The two views are:- Structure Views. Entity Views.

Linq file extension, What is the LINQ file extension that interacts with Co...

What is the LINQ file extension that interacts with Code Behind objects. Ans) its .dbml

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