POV-Ray : Newsgroups : povray.general : dual G4 performance : Re: dual G4 performance Server Time
9 Aug 2024 09:00:14 EDT (-0400)
  Re: dual G4 performance  
From: Thorsten Froehlich
Date: 8 Aug 2000 09:09:16
Message: <3990067c@news.povray.org>
In article <chrishuff-69ABA9.07274608082000@news.povray.org> , Chris Huff 
<chr### [at] maccom>  wrote:

> As I understand it, the problem isn't the cooperative multitasking, it
> is the way the multiprocessing is done. Currently, the Mac OS doesn't do
> SMP(symmetric multiprocessing), it is assymetric.

Well, the fact that it is asymmetric is a consequence of the co-operative
OS. To put it in strong words, the OS is to root of all evil.  Its
co-operative nature, due to its age and original system, is causing all
kinds of problems today. Nevertheless, it is remarkably stable compared to
systems having pre-emptive multitasking and memory protection...

> I think the OS gets
> one CPU, and applications run on the second, unless they are
> specifically designed to handle multiple CPUs(PhotoShop, for example,
> can use both CPUs).

The second CPU is not used at all if the an application does not use the
so-called "Multiprocessing API" to create multiple threads.  While the full
detail of the implementation of this is not documented by Apple, the
documentation makes clear that the OS will only run on the "first" processor
together with all other applications. Only when an application creates
pre-emptive threads using the MP-API, the second CPU will be available to
those threads.  Additionally, the OS will share the first CPU with those
threads.  Due to the support for co-operative multitasking is is still
possible for an application to lock both CPUs by creating a single
pre-emptive thread on the second CPU and use the first CPU exclusively via
co-operative scheduling.

Currently an application using the pre-emptive threads may only call certain
reentrant parts of the Mac OS, in particular the file and device manager
(requires Mac OS 9 then, I think).  Every other system function has to be
called using a remote-procedure call  mechanism, which then forces all
threads to hold and execute the function on the CPU running the Mac OS.

So, also not tested, it should be possible to run POV-Ray Mac (3.5) in the
same way the Windows version does.  One CPU (the second one in this case)
would do the rendering, and the first one runs the editor and all other
applications.  With such a version of POV-Ray Mac, it should also be
possible to run it twice, and use both processors.

Unfortunately, this is all theoretical, and without a dual processor Mac, I
am not going to attempt to write such a version.  Maybe the university I
attend will get a few dual G4 Macs soon, so I can at least debug it...


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.