Re: [Hardhats-members] Interleaving

2006-01-18 Thread Bhaskar, KS
On Tue, 2006-01-17 at 18:40 -0600, Greg Woodhouse wrote: > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > > > Looks like the job manager is allowing each task only one > instruction > > cycle, then moves on. Since each job is identical, it seems > > reasonable that they would show a strict a

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Gregory Woodhouse
On Jan 17, 2006, at 8:55 PM, Chris Richardson wrote: You guys are making it so complicated. Why not just have each copy of the process do this; S ^RRCTST($H,$J)=$G(^RRCTST($H,$J))+1 Then you can run as many copies of the routine as you wish for as long as you wish and in post processing

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Gregory Woodhouse
On Jan 17, 2006, at 4:40 PM, Greg Woodhouse wrote: --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: Looks like the job manager is allowing each task only one instruction cycle, then moves on. Since each job is identical, it seems reasonable that they would show a strict alternating pattern.

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Chris Richardson
coarse, make a call to the OS to get the current millisecond count and replace the $H reference. - Original Message - From: "Gary Monger" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 17, 2006 8:15 PM Subject: RE: [Hardhats-members] Interleaving > For that kind of

RE: [Hardhats-members] Interleaving

2006-01-17 Thread Gary Monger
: [Hardhats-members] Interleaving On Jan 17, 2006, at 7:07 PM, Gary Monger wrote: > Wouldn't the HL7 link monitor be an example of this? The background > processes write something about their state to a global and some other > process monitors the global and displays it. I don&#

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Gregory Woodhouse
On Jan 17, 2006, at 7:07 PM, Gary Monger wrote: Wouldn't the HL7 link monitor be an example of this? The background processes write something about their state to a global and some other process monitors the global and displays it. I don't think so. The time scales are very different: The HL

RE: [Hardhats-members] Interleaving

2006-01-17 Thread Gary Monger
ed to lock. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gregory Woodhouse Sent: Tuesday, January 17, 2006 9:50 AM To: hardhats-members@lists.sourceforge.net Subject: Re: [Hardhats-members] Interleaving On Jan 15, 2006, at 7:03 PM, Gregory Woodhouse wrote: >

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Greg Woodhouse
--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > Looks like the job manager is allowing each task only one instruction > cycle, then moves on. Since each job is identical, it seems > reasonable that they would show a strict alternating pattern. > > Kevin it surprises me. Switching between task

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Kevin Toppenberg
Looks like the job manager is allowing each task only one instruction cycle, then moves on. Since each job is identical, it seems reasonable that they would show a strict alternating pattern. Kevin On 1/17/06, Greg Woodhouse <[EMAIL PROTECTED]> wrote: > --- Steven McPhelan <[EMAIL PROTECTED]>

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Greg Woodhouse
--- Steven McPhelan <[EMAIL PROTECTED]> wrote: > Mostly likely J1 would > run to > completion before J2 even started. With most processes today, I > doubt 15000 > would be sufficient. > Curiouser and curiouser...After 158,108 (on this run) there was a switch, but then the two jobs proceeded in

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Greg Woodhouse
--- Steven McPhelan <[EMAIL PROTECTED]> wrote: > Your increment example would show the interleave by looking at the > subscripted global. Why not do this as: > > S ^GLB="" > > J1 ; > F I=1:1:100 S ^GLB=$G(^GLB)_"A" > Q > > > > J2 ; > F I=1:1:100 S ^GLB=$G(^GLB)_"B" > Q > >

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Steven McPhelan
Your increment example would show the interleave by looking at the subscripted global.  Why not do this as:   S ^GLB=""   J1 ;     F I=1:1:100 S ^GLB=$G(^GLB)_"A"     Q       J2 ;     F I=1:1:100 S ^GLB=$G(^GLB)_"B"     Q     Wouldn't that show interleaving within standard M without using the expli

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Kevin Toppenberg
Interesting. Try making the jobs each do 1000 or 5000 writes. It may be that after the command J RUN("A") is completed and before then next line J RUN("B") is interpreted and compiled, during this time RUN("A") has time complete. But maybe that was what you ment regarding "pre-empted". Kevin

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Greg Woodhouse
Also, it turns out that (unless I put a HANG in the loop), this code doesn't demonstrate any interleaving anyway (probably because the background jobs finish before they are pre-empted: BAY>ZL ZZGREG1 ZP EN ; ; 1/17/06 6:04pm K ^XTMP("GREG") S ^XTMP("GREG")=0 J RUN

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Greg Woodhouse
--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > Greg, > > I'll be dumb here. I was not aware of the $increment function. I > just look here: > http://www.jacquardsystems.com/Examples/ > > and don't see it in the list of functions. What am I missing? > > Also, could you modifiy my code so t

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Kevin Toppenberg
Greg, I'll be dumb here. I was not aware of the $increment function. I just look here: http://www.jacquardsystems.com/Examples/ and don't see it in the list of functions. What am I missing? Also, could you modifiy my code so that if a lock was encountered, it would pause briefly and try again

Re: [Hardhats-members] Interleaving

2006-01-17 Thread Gregory Woodhouse
On Jan 15, 2006, at 7:03 PM, Gregory Woodhouse wrote: On Jan 15, 2006, at 4:28 PM, Kevin Toppenberg wrote: How about writing to a global: +L set ^GLOBAL(^GLOBAL(0))=VALUE,^GLOBAL(0)=^GLOBAL(0)+1 -L Kevin That won't work (because of the lock). What I'd like to do is, in some sense, the

Re: [Hardhats-members] Interleaving

2006-01-15 Thread Gregory Woodhouse
On Jan 15, 2006, at 4:28 PM, Kevin Toppenberg wrote: How about writing to a global: +L set ^GLOBAL(^GLOBAL(0))=VALUE,^GLOBAL(0)=^GLOBAL(0)+1 -L Kevin That won't work (because of the lock). What I'd like to do is, in some sense, the opposite of what you usually want to do with concurrent

Re: [Hardhats-members] Interleaving

2006-01-15 Thread Kevin Toppenberg
How about writing to a global: +L set ^GLOBAL(^GLOBAL(0))=VALUE,^GLOBAL(0)=^GLOBAL(0)+1 -L Kevin On 1/15/06, Gregory Woodhouse <[EMAIL PROTECTED]> wrote: > > > In Scheme, I can have multiple threads writing to the same terminal, > but not in MUMPS. True, I can have multiple terminals open and s

Re: [Hardhats-members] Interleaving

2006-01-15 Thread Gregory Woodhouse
On Jan 15, 2006, at 1:43 PM, Gregory Woodhouse wrote: In Scheme, I can have multiple threads writing to the same terminal, but not in MUMPS. True, I can have multiple terminals open and see the output in each, but what I'd like to see is the output of one job *interleaved* with the other.

Re: [Hardhats-members] Interleaving

2006-01-15 Thread Gregory Woodhouse
On Jan 14, 2006, at 11:40 PM, Jim Self wrote: Gregory wrote: How can you demonstrate the interleaving of jobs without disturbing it with explicit synchronization? JOB BODY("A") JOB BODY("B") where BODY is just a FOR loop BODY(X) ; FOR I=1:1:25 WRITE X QUIT But, of course that's not all

Re: [Hardhats-members] Interleaving

2006-01-14 Thread Jim Self
Gregory wrote: >How can you demonstrate the interleaving of jobs without disturbing >it with explicit synchronization? >JOB BODY("A") >JOB BODY("B") > >where BODY is just a FOR loop > >BODY(X) ; > FOR I=1:1:25 WRITE X >QUIT > >But, of course that's not allowed, because background jobs can't >wr

[Hardhats-members] Interleaving

2006-01-14 Thread Gregory Woodhouse
How can you demonstrate the interleaving of jobs without disturbing it with explicit synchronization? I actually did this in PLT Scheme as follows (define (the-body x) (begin (let loop ((i 0)) (begin (if (< i 25) (begin (display x) (