[Coco] (Nitr)OS-9 and path numbers in MWC
Boisy Pitre
boisy at boisypitre.com
Mon Dec 4 13:07:14 EST 2006
On Dec 4, 2006, at 7:36 AM, Jeff Teunissen wrote:
> Also, has anyone thought of using a per-user data module for
> mocking up an
> environment space? Say, an 8K module named ENV<uid> that would be
> read from a
> random or sequential file by the Shell (or LOGIN, on multi-user
> systems) to
> hold shell variables like the PATH, Multi-Vue information, the
> user's "home"
> directory, etc.
Some years back I made a proposal for environment variables under
then-OS-9 (now NitrOS-9) but cannot seem to find that post. My
solution didn't use a data module but instead relied on the memory
being allocated in the process' space at F$Fork time and accessible
in such a way that it would pose no compatibility problems.
Now that I think about it, here's an implementation off the top of my
head: reserve two bytes in the process descriptor to be a pointer to
a block of system RAM. Also create a new system call: F$Env. From
this call, a SetEnv or GetEnv could be performed.
Upon the first call to F$Env for a process, a 256 byte page would be
allocated from process' 64K memory space. Some indexing scheme could
be employed to hold the environment variable name and its contents in
that page. When that page is filled, a new one could be allocated.
The real work would be to develop an efficient (both in terms of
space and time) way to manage the environment variables in those 256
byte pages: SET, GET and DELETE operations would be need to be
implemented.
It definitely is doable and can even be written to exist in a KrnP3
kernel extension module. Jeff, do you think this is something you
would be interested in tackling? I would definitely add something
like this to the NitrOS-9 Project.
> --
> | Jeff Teunissen -=- Pres., Dusk To Dawn Computing -=- deek at
> d2dc.net
> | GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840
> 105A
> | Core developer, The QuakeForge Project http://
> www.quakeforge.net/
> | Specializing in Debian GNU/Linux http://www.d2dc.net/
> ~deek/
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list