9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Porting XaoS (saga continues)
@ 1997-09-10 15:40 Tom
  0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 1997-09-10 15:40 UTC (permalink / raw)


On Sep 10, 10:53am, Jan Hubicka wrote:
> Opps. I have just demo installation so I can't read sources :(
> I really want to see them, but I am poor student and $120 is too much
> for me :(

If you're a student, and you can find a few more interested students
(say 10, total) at your institution, you could each pony up a small fraction
of the cost and buy a distribution for your school.  The license is a site
license, so you can all use the system under the auspices of the school.

Uhh, you probably have to have permission to act under the school's
auspices, but surely you can find a teacher that thinks this is a good idea.

Also, the cost is about $350, not $120, but 10% of that is still only $35.
Of course you only get one paper copy of the documentation, but the CD-ROM
has machine-readable versions of everything in the books.

-- 
Tom Duff, KF6LWB




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] Porting XaoS (saga continues)
@ 1997-09-11  8:32 Jan
  0 siblings, 0 replies; 5+ messages in thread
From: Jan @ 1997-09-11  8:32 UTC (permalink / raw)


On Wed, Sep 10, 1997 at 08:40:07AM -0700, Tom Duff wrote:
> On Sep 10, 10:53am, Jan Hubicka wrote:
> > Opps. I have just demo installation so I can't read sources :(
> > I really want to see them, but I am poor student and $120 is too much
> > for me :(
> 
> If you're a student, and you can find a few more interested students
> (say 10, total) at your institution, you could each pony up a small fraction
I am trying to do that. I fact I asked my school to buy it and they agree
so, if I will find enought students interested in it. Problem is that
school buyed spring deveral years ago, and no one uses it so they think
that with plan9 it should be similiar.
So I am currently looking for students (and project) for plan9.
> of the cost and buy a distribution for your school.  The license is a site
> license, so you can all use the system under the auspices of the school.
> 
> Uhh, you probably have to have permission to act under the school's
> auspices, but surely you can find a teacher that thinks this is a good idea.
I tried so, but the teacher for unix send me to some other thaches for operating
system and when I came there, he was playing syndicate in win95, so thats
probably purpose why he was so angry to me :(
They also say that fact that plan9 is dead is bad, and it should be better
to wait for brazil.
> 
> Also, the cost is about $350, not $120, but 10% of that is still only $35.
Well $35 is all money I earn for a month... (when I skip money payed
for house ($70))
> Of course you only get one paper copy of the documentation, but the CD-ROM
> has machine-readable versions of everything in the books.
OK..
I personally think that it is bad, that plan9 is not free. I don't think
Bell-labs should get any significant amount of money for selling plan9,
so it should be better to make it free, since it has so may interesting 
ideas and I think that everyone who is interested in Operating Systems 
should definitly see it.

During deverlopment period of XaoS3.0 I again saw how much easier is thinks
under plan9/8 1/2 in comparation to UNIX/X11 (well mainly X11...) I enjoyed
fact, that plan9 has such small standard library but when I need some
function (like coprocessor control/image saving) it is usually there.
Except thread stuff, but I agree that aleph is right think to do. Only
problem is that alepth is plan9/SGI only, as far as I know.

Honza
> 
> -- 
> Tom Duff, KF6LWB

-- 
------------------------------------------------------------------------------
                   Have you browsed my www pages? Look at:
                       http://www.paru.cas.cz/~hubicka
      Koules-the game for Svgalib,X11 and OS/2,  Xonix-the game for X11
      czech documentation for linux index, original 2D computer art and
              funny 100 years old photos and articles are there!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] Porting XaoS (saga continues)
@ 1997-09-10  8:53 Jan
  0 siblings, 0 replies; 5+ messages in thread
From: Jan @ 1997-09-10  8:53 UTC (permalink / raw)


On Tue, Sep 09, 1997 at 07:39:39AM +0000, forsyth@caldo.demon.co.uk wrote:
> see /sys/src/cmd/disk/kfs/libp/port/qlock.c and related
> files for a user-level QLock and RWLockimplementation.  you should
Opps. I have just demo installation so I can't read sources :(
I really want to see them, but I am poor student and $120 is too much
for me :(
> be able to implementat what you need with that.  note too that
> sleep(0) will relinquish the CPU.  see /sys/src/cmd/exportfs
> and /sys/src/cmd/telco for other examples of multi-process
> servers and different approaches to synchronisation.
> you'll also find a concurrency-safe version of
> malloc.c in at least one of those directories.
> 
> most new concurrent programs in Plan 9 are (best)
> written in Alef, so not much effort has gone into providing
I am sorry, but I don't plan to rewrite XaoS into alef, since I want
to keep portability with other OSes too.
> a complete programming package for the venerable C.
> 
> one point that's easy to overlook is that fork(2) notes that rfork(RFPROC|RFMEM)
> causes ALL subsequent forks to share data.  consequently, you need to ensure that
> einit(...) is called to initialise the graphics event code before you do
> the first RFMEM rfork, otherwise things can get a little bit confused.
Ok. Need I do that in case other tasks don't access graphics too?
(Linux requires the opposite so it would require one extra ifdef, wich
is always ugly... :( )
> 
> as to the second question, i'm afraid that Plan 9 graphics supports only
> up to 8 bits (0 <= Bitmap.ldepth <= 3).  it's not just 8½; it would require
> a fair amount of effort to change.
OK no problem :) So XaoS now supports all modes supported by 8 1/2 - 1boo
and 8 bpp :)
Yesterday I implemented dithering, so XaoS should emulate truecolor..

Honza

-- 
------------------------------------------------------------------------------
                   Have you browsed my www pages? Look at:
                       http://www.paru.cas.cz/~hubicka
      Koules-the game for Svgalib,X11 and OS/2,  Xonix-the game for X11
      czech documentation for linux index, original 2D computer art and
              funny 100 years old photos and articles are there!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] Porting XaoS (saga continues)
@ 1997-09-09  8:28 Jan
  0 siblings, 0 replies; 5+ messages in thread
From: Jan @ 1997-09-09  8:28 UTC (permalink / raw)


Hi
Yesterday I solved problem with compiler - cleaned up code. Everything
seems to work now. 9c is nice, that it detects ugly code and automatically
refuses it. :) Maybe UGLYNESS constant should be set higher in next
version.

I also did some cleaning in order to make XaoS smaller
but not big success :( Just saved about 8KB of executable...

Question 1:
Since XaoS now seems to work, I decided to start work at multithreading.
I ran into problems with plan9 api.
I use following scheme: I have queue with points, each processor takes
point from queue, calculates it and its neighbors and adds new points
into queue if neccesary.
I need an lock to queue to avoid conflicts. I found spinlocks in plan9
API, but I wonder if they eats CPU time or not. At least BeOS implementation
of spinlocks is that CPU waits in loop until other CPU unlocks it. It is
not what I need, since I want to do tests at singe CPU, where it should
make problems....
And other problem is that in case queue is empty, thread has to asleep,
since other process should be calculationg some pixel and then when he
adds new points into queue, it calls wakeup function to wakeup waiting
process, that should start processing new points.
At the end, when threads know that he is latest working, and that queue
is empty, he sets exit flag and wakes up all threads, they reads exit flag
and exits imediately.

Is there some sleep/wakeup mechanizm (in combination with locks, since I
need to be sure that when process asleeps, queue is empty. So I need
stuff similiar to cond in POSIX).

Or is there some completly different way to implement this eleganlty using
plan9 API?
I saw sleep/wakeup implementation in docs. Is this function in libc, or
do I need to copy sources?

Question 2:
What bitmap depts 81/2 currently supports? 1bpp,8bpp and some others?

Many thanks to those, who replied to my last question. This list
seems to be most helpfull from all lists I ever saw!

Honza
-- 
------------------------------------------------------------------------------
                   Have you browsed my www pages? Look at:
                       http://www.paru.cas.cz/~hubicka
      Koules-the game for Svgalib,X11 and OS/2,  Xonix-the game for X11
      czech documentation for linux index, original 2D computer art and
              funny 100 years old photos and articles are there!





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] Porting XaoS (saga continues)
@ 1997-09-09  6:39 forsyth
  0 siblings, 0 replies; 5+ messages in thread
From: forsyth @ 1997-09-09  6:39 UTC (permalink / raw)


see /sys/src/cmd/disk/kfs/libp/port/qlock.c and related
files for a user-level QLock and RWLockimplementation.  you should
be able to implementat what you need with that.  note too that
sleep(0) will relinquish the CPU.  see /sys/src/cmd/exportfs
and /sys/src/cmd/telco for other examples of multi-process
servers and different approaches to synchronisation.
you'll also find a concurrency-safe version of
malloc.c in at least one of those directories.

most new concurrent programs in Plan 9 are (best)
written in Alef, so not much effort has gone into providing
a complete programming package for the venerable C.

one point that's easy to overlook is that fork(2) notes that rfork(RFPROC|RFMEM)
causes ALL subsequent forks to share data.  consequently, you need to ensure that
einit(...) is called to initialise the graphics event code before you do
the first RFMEM rfork, otherwise things can get a little bit confused.

as to the second question, i'm afraid that Plan 9 graphics supports only
up to 8 bits (0 <= Bitmap.ldepth <= 3).  it's not just 8½; it would require
a fair amount of effort to change.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-09-11  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-10 15:40 [9fans] Porting XaoS (saga continues) Tom
  -- strict thread matches above, loose matches on Subject: below --
1997-09-11  8:32 Jan
1997-09-10  8:53 Jan
1997-09-09  8:28 Jan
1997-09-09  6:39 forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).