T.R | Title | User | Personal Name | Date | Lines |
---|
1557.1 | move over, Mac | WJG::GUINEAU | | Fri Jul 22 1988 13:40 | 8 |
|
> before begining the main work. Our division laid the idea of the
> Amiga's multitasking in my lap. So I came to you! The loyal DEC
Do you mean DEC has you working on Amiga?
John
|
1557.2 | | MEIS::ZIMMERMAN | Just what the doctor ordered | Fri Jul 22 1988 14:58 | 4 |
|
Better yet, is DEC doing adventure games?
- Z
|
1557.3 | Whoops! Sorry, didn't mean to confuse the issue. | NITMOI::WITHERS | | Fri Jul 22 1988 16:20 | 15 |
| sorry...
You misunderstood my problem. I used the word "division" as in
to divide between myself and my friend what we are trying to get
straight. This is non-DEC related. I'm just working on this in
my spare time. I just thought to ask here because you might know
a book/source/etc. that explains concisely how to tap the Amiga's
multitasking resources. I didn't mean it to sound like this was
something for work or even done at DEC. Once again, sorry...I guess
I shouldn't have asked here but I found very little code utilizing
the tasking features and the books I have at home only has a very
small, cryptic section on multitasking.
Sorry again, George
|
1557.4 | Many different program structures | TLE::RMEYERS | Randy Meyers | Fri Jul 22 1988 18:31 | 24 |
| Re: .0
Amiga programmers can use several different methods of using multitasking
in their programs. It depends on what you need to do.
For example, if you have a program that just wants another process to do
something for it in parallel, you could just call the Execute function
with a command sting like "RUN FOO".
If you have in mind a program where several different tasks are all
doing their jobs and providing information back to some central
process, you might want the processes to just send messages to each
other.
If you want processes to be very tightly bound together and to update
common data structures in memory, you will have to provide your own
spinlocks to coordinate access. (Actually, the system does provide
semaphores, but I never have been interested enough to learn how to
use them. They aren't documented in the manuals; you need to order
the Developer's Update for documentation. Ordering the developer's
update is a good idea anyway. It only costs $25 and anyone can order
it.
So, what what are you trying to do?
|
1557.5 | | WJG::GUINEAU | | Mon Jul 25 1988 08:49 | 9 |
|
Re .3:
This is the (at least one) correct place to ask about AMIGA
stuff. Your questions will probably help someone else
sometime...
John
|
1557.6 | What I'm trying to do... | NITMOI::WITHERS | | Mon Jul 25 1988 13:58 | 16 |
| Right now its more of an educational thing. The actual application
isn't cut and dried but in essence (among other things) I want to
have multiple large programs and I didn't know if there was a clean
way to have them cut to one another. Example: Program A is huge
and it's last line EXECUTEs Program B, now both B and A are resident.
I want it to EXECUTE Program B and terminate A. In hindsight I
guess I could have it call Program C using RUN and Program C can
wait until memory is freed from A and then EXECUTE B, but I thought
there might be a cleaner way and was unsure what resources might
exist to set up the equivalent of mailboxes between processes.
I'll just have to do some experimenting and poking through sources
and see what I can see....
George
|
1557.7 | EXEC, FEXEC | YIPPEE::GOULNIK | OogaboogaBox type | Wed Jul 27 1988 05:59 | 13 |
|
Aztec C has the FEXEC functions, which will do exactly what you
need. Program A will FEXEC Program B with a command line passed
as argument, and upon completion Program B will return to caller.
I have not been able to find out how return even a status from B
to A yet but there's got to be a way. On the other hand, you can
use EXEC functions which work the same but don't return to the
caller. FEXEC by the way is not described in my Aztec C manual.
I suppose they both make use of less specific system routines
but I havent received the ROK Kernal manuals yet so I can't tell
which.
Iv.
|
1557.8 | Overlaying is also a possibility | BARDIC::RAVAN | | Wed Jul 27 1988 11:11 | 5 |
| Aztec C also provides a way to do overlaying within a single
task, so you don't need to use multiple tasks unless you want
simultaneous threads of execution for some purpose.
-jim
|
1557.9 | Exit code woe | TLE::RMEYERS | Randy Meyers | Wed Jul 27 1988 21:14 | 9 |
| Re: .7
> I have not been able to find out how return even a status from B
> to A yet but there's got to be a way.
As it turns out, for a program that is run asynchronously to return a
exit code is a hard problem because of the design of AmigaDOS. In fact,
it is no easy task to do even for synchronous programs. This is a
flaw in the design of AmigaDOS.
|
1557.10 | | WJG::GUINEAU | | Thu Jul 28 1988 10:56 | 16 |
| >> I have not been able to find out how return even a status from B
> to A yet but there's got to be a way.
>
>As it turns out, for a program that is run asynchronously to return a
>exit code is a hard problem because of the design of AmigaDOS. In fact,
>it is no easy task to do even for synchronous programs. This is a
>flaw in the design of AmigaDOS.
>
Couldn't the "parent" program allocate a small chunk of PUBLIC memory
(ala global section), then pass it's address (no VM to worry about here!)
in a message to it's child. Then the child could write it's completion
status in that area.
John
|
1557.11 | Two programs can always make a deal | TLE::RMEYERS | Randy Meyers | Thu Jul 28 1988 13:48 | 9 |
| Re: .10
Yep, it is always possible for two programs to make some sort of agreement
about returning status codes. However, consider the case of two arbitrary
programs. There already exists a protocol for passing back return codes
for CLI programs. Most programs manage to do this. However, this
information is unavailable when the program runs as a separate process
(CLI's run programs in the CLI's process context). That is the design
flaw I mentioned.
|