Discussion:
Project Requirement: Spawning User Processes
(too old to reply)
David Marcin
2005-09-06 21:03:17 UTC
Permalink
The details on the requirement to spawn P copies of "null.exe" seem
sparse. Should we spawn them all as quickly as possible, or should we
spawn them sequentially by waiting for the first instance to exit before
spawning the second and so on?
-- edit...I suppose that was a silly question as null.exe never exits.

Also, what happens if you attempt to spawn a process and it fails for
some reason (e.g. spawning would exceed the maximum number of user
processes)? Should you retry the spawn until you succeed, or should you
only make one attempt to spawn the process?

Last, should spawn.exe give any indication of what it is doing (e.g.
"Spawned process #x", "Failed to spawn process #y")?
Adel Youssef
2005-09-06 22:05:44 UTC
Permalink
Post by David Marcin
The details on the requirement to spawn P copies of "null.exe" seem
sparse. Should we spawn them all as quickly as possible, or should we
spawn them sequentially by waiting for the first instance to exit before
spawning the second and so on?
-- edit...I suppose that was a silly question as null.exe never exits.
You should spawn P process concurrently. This means that you should have
P processes running at the same time. That is why null.exe could be used
because it is simply an infinite loop.
Post by David Marcin
Also, what happens if you attempt to spawn a process and it fails for
some reason (e.g. spawning would exceed the maximum number of user
processes)? Should you retry the spawn until you succeed, or should you
only make one attempt to spawn the process?
You should NOT retry until success. Just terminate the process.
Post by David Marcin
Last, should spawn.exe give any indication of what it is doing (e.g.
"Spawned process #x", "Failed to spawn process #y")?
Your spawn.exe should display some error message when it captures the
-1. I have just added this to the specs.

Loading...