Home Page Up one Level Site Map Send us mail
TOPIC:
How MediaMogul and Script2Disc 2.1 handle Call and Call_bg commands in scripts.
OVERVIEW:
Terminology -
OS-9 is a multitasking system, meaning it can run many programs, or what it
calls PROCESSES, at the same time. In a broad sense, BACKGROUND processes are
those that don't require attention from the person at the keyboard/display
(like programs that update the time, or mouse drivers that monitor the mouse,
etc.). FOREGROUND processes DO hold captive the display and keyboard (like
word processors, spread sheets...). Foreground processes can be moved to the
background (like when re-calculating a spreadsheet), or background processes
moved to the foreground (like when you want the time and date).
MediaMogul can start other foreground processes (Call) or background processes (Call_bg) from within scripts. The rules are:
For example, you cannot (should not) have two copies of cdi_display_strvar (displays string variables) running simultaneously in the background and fighting for the display. MediaMogul would start the first one, wait for it to finish, then start the second one. Both would be run in the background.
DISCUSSION:
MediaMogul and Script2Disc have changed their Call and Call_bg handling slightly in version 2.1.
An example to explain the last two points:
00:00 Dissolve /h0/VIDEO/marina.d 2:00 00:00 Play /h0/AUDIO/cool_storm.cm 00:00 00:00 00:00 Call_bg /h0/SUBROUTINES/dir >/term 00:00 Call_bg /h0/SUBROUTINES/dir >/term 00:00 Call_bg /h0/SUBROUTINES/dir >/term 03:00 Br_alwys_nr /h0/SCRIPTS/help.scr
Below is chart illustrating the various actions, and the order (but not time at which) they occur. The only noticeable interference the foreground process will likely receive from the background processes is to when the Br_alwys_nr happens. If the dir processes take a lot of time to complete (directory of entire /h0), the branch may be delayed way past 03:00. MediaMogul will not allow the branch to occur until the LAST background dir has BEGUN. The last dir can continue listing to the terminal during and even after the next script has begun.
BACKGROUND QUEUE FOREGROUND -------------------------------------- ---------------------------------- Call_bg /h0/SUBROUTINES/dir >/term Dissolve /h0/VIDEO/marina.d Call_bg /h0/SUBROUTINES/dir >/term Play /h0/AUDIO/cool_storm.cm Call_bg /h0/SUBROUTINES/dir >/term Br_alwys_nr /h0/SCRIPTS/help.scr
In its background queue, MediaMogul WAITS until one dir process has completed before issuing the next Call_bg to dir. The Dissolve and Play will begin in the foreground together as scheduled.
Remember that MediaMogul is managing both a background process queue and foreground processes SIMULTANEOUSLY (like chewing gum and walking).
Home Page Up one Level Site Map Send us mail