Comments (1)
I believe it is correct, but phrased somewhat ambiguously.
I updated this section to the following:
A slight improvement to fixed timeslice scheduling is to pick a target latency — the ideal longest time for a process to respond. The target latency is the time it takes for a process to resume execution after being preempted, assuming a reasonable number of processes. This is pretty hard to visualize! Don't worry, a diagram is coming soon.
Timeslices are calculated by dividing the target latency by the total number of tasks; this is better than fixed timeslice scheduling because it eliminates wasteful task switching with fewer processes. With a target latency of 15 ms and 10 processes, each process would get 15/10 or 1.5 ms to run. With only 3 processes, each process gets a longer 5 ms timeslice while still hitting the target latency.
Process switching is computationally expensive because it requires saving the entire state of the current program and restoring a different one. Past a certain point, too small a timeslice can result in performance problems with processes switching too rapidly. It's common to give the timeslice duration a lower bound (minimum granularity). This does mean that the target latency is exceeded when there are enough processes for the minimum granularity to take effect.
At the time of writing this article, Linux's scheduler uses a target latency of 6 ms and a minimum granularity of 0.75 ms.
![]()
Is this easier to understand, or is there still a technical problem?
from putting-the-you-in-cpu.
Related Issues (20)
- EPUB Version HOT 13
- Questions about Chapter 1 HOT 2
- Faggin made the first *microprocessor* HOT 1
- Should I mention PC? HOT 1
- Not a real issue HOT 1
- Hackclub
- PNG image optimization HOT 9
- Reference on the MacOS "split"
- Mismatched lines and line numbers on mobile HOT 3
- Possibility of discussion of ld.so/dyld/etc. behavior HOT 1
- Add bookmarks to the PDF edition
- Coop mutitasking correction/clarification
- Is this calculation correct?
- Time Slicing Diagram
- Maybe a mistake of Ch.4 A brief Explanation of Linking HOT 1
- Broken link in chapter 4
- More info on the SYSCALL_DEFINE3 security vulnerability
- Potentially unclear explanation of register usage in chapter 4 - Becoming an elf lord
- Link in the Section Header Table no longer works
- Kernel space size in virtual memory size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from putting-the-you-in-cpu.