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

Add references dialog box, What is the difference among "using System.Data;...

What is the difference among "using System.Data;" and directly adding the reference from "Add References Dialog Box"?  When you compile a program using command line, you add th

What is the use and function of file transfer protocol, What is the use and...

What is the use and function of File Transfer Protocol? FTP : File Transfer Protocol (FTP) is the protocol used upon the Internet for sending files and is usually used fo

State in brief about the pseudo instruction, State in brief about the pseud...

State in brief about the pseudo instruction A pseudo instruction isn't a real instruction. CPU can't execute it. It often requires a complex architectural operation and if it w

Displacement addressing mode - computer architecture, Displacement and  Sta...

Displacement and  Stack Addressing  mode - computer architecture: Displacement Addressing: In displacement addressing mode there are three types of addressing mode. They

Define TII, TII stands for? Ans. TII stands for Table of incomplete ins...

TII stands for? Ans. TII stands for Table of incomplete instructions.

Where engaged tone is generated, E ngaged tone is generated in the: (...

E ngaged tone is generated in the: (A)  Telephone instrument of calling subscriber (B)  Telephone instrument of called subscriber (C)  Exchange (D)  Repeater

Binary, 8:1 Mux for a given function, f=S (0, 1,5,7,9, 13)..

8:1 Mux for a given function, f=S (0, 1,5,7,9, 13)..

Explain non-folded network, Explain Non-Folded network Non-Folded Netw...

Explain Non-Folded network Non-Folded Network: In a switching network, every inlet/outlet connection may be utilized for inter exchange transmission. In this case, the .excha

Statistical technique, Ask qa survey was conducted among the residents of p...

Ask qa survey was conducted among the residents of pune city,it suburbs and the pune cantonment area.the following three pie diagrams show their respective preferences for living i

Explain concept of temporal parallelism, Concept of Temporal Parallelism  ...

Concept of Temporal Parallelism  In order to make clear what is meant by parallelism inherent in solution of a problem, let's discuss an example of submission of electricity b

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