Comments (3)
I think it's something like this:
- Priorities go from low to high. That is, a higher priority number means that the thread has lower priority.
- There's a "ready queue", of all the threads that are ready to run right now (not WAIT or STOPPED). What RotateReadyQueue does it to put the current thread on the end of this queue, and then walks the queue until it finds another thread that has the same or lower priority number, and context switches to it. This way, threads with a higher priority number will indeed NEVER run after RotateThreadReadyQueue if there are threads with a lower priority around.
I didn't think RotateThreadReadyQueue had an argument?
We need to simply implement this ready queue and insert/remove threads from it when threads wait and stop and resume etc.
Exactly how a regular rescheduling chooses the next thread, I'm not clear about. But I think also there it's the case that if there are ready threads with a lower priority number, a high-priority-number thread will NEVER run.
from ppsspp.
I see, the current thread's priority. That makes sense.
This says it has a parameter but it could definitely be wrong:
http://psp.jim.sh/pspsdk-doc/group__ThreadMan.html#gaa8bc5f547a985ed13ec982bc83c0a895
That said, when passing two separate parameters, different results are very reproducible. If you reverse the calls or etc. So it seems like there's a parameter that does something.
Debugging since I created this issue, I found that the actual problem here might be that wait timers are firing on deleted threads. Making a change to not reuse slots in the kernel object pool, things became fair (and also much slower than the PSP.)
-[Unknown]
from ppsspp.
Can we close this?
from ppsspp.
Related Issues (20)
- [GNU/Linux] [LibRetro] [Vulkan] Core segfaults when changing internal resolution
- [GNU/Linux] [Out Run 2006] Game crashes when starting a race. HOT 5
- PPSSPPSDL crash when compiled in Debug mode on EMUELEC HOT 3
- Selecting Achievements entry crash PPSSSDL with any game HOT 4
- Ubershader - Vertex causing darker color in Yu-Gi-Oh Arc V Tag Force Special HOT 5
- Audio stopping, Crashing, and using too much RAM HOT 1
- Broken lighting in some games (bloom effects at higher resolutions) HOT 3
- "Upnp needs to be Reinitialized" and "Failed to offset port 555" HOT 10
- Fails to build retroarch core with gcc-14 HOT 3
- ppsspp 32 bit HOT 2
- Feature request: exit back to frontend HOT 5
- Choosing a scripting language HOT 8
- Disabling plugins and closing the emulator re-enable them HOT 5
- Textures Folder Has Permissions on Android TV HOT 22
- Bad symlink in vulkan ext subdir
- Akiba's Trip Plus little sister from the future HOT 1
- Syphon Filter: Remaining lighting problem (HW/SW transform difference)
- Need better handling of out-of-memory conditions when using texture replacement
- compile for aarch64 target,ld error undefined reference to `CpuFeatures_GetHardwareCapabilities' undefined reference to `CpuFeatures_IsHwCapsSet' HOT 3
- Reports of plugins not working correctly HOT 1
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 ppsspp.