Page 1 of 1

Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 2:19 am
by Perica
..

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 6:45 am
by Slasher
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.

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 9:25 am
by Pype.Clicker
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.

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 3:21 pm
by _mark
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()

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 6:13 pm
by Tim
_mark() wrote:Oh - and my OS is limited to 32.
32 threads or 32 processes?

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Tue Apr 08, 2003 10:16 pm
by _mark
I'm calling them tasks, but it is pretty much a thread that executes an EXE.

Mark

Re:Imposing a Limit on the Amount of User-Tasks Running?

Posted: Wed Apr 09, 2003 1:36 am
by Tim
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?

Posted: Wed Apr 09, 2003 8:22 am
by _mark
LOL - maybe - I'm not sure yet. Right now it is scope creep of my second stage loader. :)

_mark()