Imposing a Limit on the Amount of User-Tasks Running?
Imposing a Limit on the Amount of User-Tasks Running?
..
Last edited by Perica on Sat Dec 02, 2006 11:27 pm, edited 2 times in total.
Re:Imposing a Limit on the Amount of User-Tasks Running?
I think you should take Tim's advice cause you never know what a user is going to do. Also imposing a limit actually makes the code harder and slower as you keep testing to see that the limit has not yet been reached in all functions that are going to access you process list, every time you allocate a slot, every time you increase and decrease the slot counter, etc
No limit on process list is just dynamic data structures like link lists (simplest), binary trees and co.
if you have a memory allocation function then you can easily have a limitless list of processes.
And for you question yes, 300 hundred will be too much for some users and not enough for others. think of multiple processes having multiple threads.
No limit on process list is just dynamic data structures like link lists (simplest), binary trees and co.
if you have a memory allocation function then you can easily have a limitless list of processes.
And for you question yes, 300 hundred will be too much for some users and not enough for others. think of multiple processes having multiple threads.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Imposing a Limit on the Amount of User-Tasks Running?
remember that you will not have one single task per application the user launched. A lot of subsystems (known as "daemons" in unix world) are requiring a task that is almost always inactive and that will become active when the memory gets full, or when a page is spooled to the printer, etc.
Also, if you consider command-line programmings, its not rare to have a lot of processes started (for instance when starting a huge MAKE process): if process are created recursively, then the fixed limit may become a nuisance quicker than you wished.
Also, if you consider command-line programmings, its not rare to have a lot of processes started (for instance when starting a huge MAKE process): if process are created recursively, then the fixed limit may become a nuisance quicker than you wished.
Re:Imposing a Limit on the Amount of User-Tasks Running?
It really depends on the OS and what it is intended for. 300 is probably to many for a single user real-time OS. It is probably fine for a single user Graphical OS, or even a workstation OS of sorts. But the guys are right, if you intend to have it run any real internet servers or database servers or something like that, it should be dynamic.
Personally I would much prefer a message from my Windows box saying it had to much going on as apposed to how it gets real sluggish and almost un-usable when heavy swapping is going on.
Oh - and my OS is limited to 32.
_mark()
Personally I would much prefer a message from my Windows box saying it had to much going on as apposed to how it gets real sluggish and almost un-usable when heavy swapping is going on.
Oh - and my OS is limited to 32.
_mark()
Re:Imposing a Limit on the Amount of User-Tasks Running?
32 threads or 32 processes?_mark() wrote:Oh - and my OS is limited to 32.
Re:Imposing a Limit on the Amount of User-Tasks Running?
I'm calling them tasks, but it is pretty much a thread that executes an EXE.
Mark
Mark
Re:Imposing a Limit on the Amount of User-Tasks Running?
Isn't that a little low? Or are you writing an OS for some embedded system?
Re:Imposing a Limit on the Amount of User-Tasks Running?
LOL - maybe - I'm not sure yet. Right now it is scope creep of my second stage loader.
_mark()
_mark()