RE: [U2] [UV] Basic Program Scheduling Priority {Unclassified}

2007-01-18 Thread Gordon J Glorfield
Mike,

We are running on Solaris and UniVerse 10.1.6 Pick format.  Here are the 
results I got.  It was on our development machine which is not quite as 
beefy as our production system.

THE.START 60016 [16:40:16] 
NAP.END 60118 
Average elapsed time of NAP 1 is 10.20 milliseconds 
 Minimum value of NAP 1 is 0 milliseconds 
 Maximum value of NAP 1 is 1000 milliseconds 
TIME.END 61118 [16:58:38] 
Average difference of TIME() is 1000.00 milliseconds 
Minimum difference of TIME() is 1000 milliseconds 
Maximum difference of TIME() is 1000 milliseconds 


Gordon J. Glorfield
Sr. Applications Developer
UnitedHealthcare's Mid-Atlantic Health Plans
301-360-8839

[EMAIL PROTECTED] wrote on 01/14/2007 02:48:15 PM:

 Perry,

 NAP takes milliseconds as its parameter, but, at least on Windows
 platforms, NAP 1 does not sleep for 1 millisecond, but actually for
 about 15 milliseconds.

 It seems that there is a fundamental clock somewhere in the UV Basic
 runtime environment on Windows that only 'ticks' about once every
 15-and-a-bit milliseconds (I think 15.3 ms from memory).
 You can demonstrate this by getting TIME() in a tight loop and seeing
 the values and how they change.  You get the same value returned again
 and again, then it will jump up by 15 or 16 milliseconds. This has been
 the case at least across 9.6, 10.0 and 10.1 - I haven't tried 10.2 yet.

 I'd be interested if someone could try this on a Unix / Linux platform
 and see if they observe the same phenomenon, or if it's a Windows
 Special Feature (TM) ;-)
 Code to do it is below.

 Regards

 
 Mike
[snip]


This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: RE: [U2] [UV] Basic Program Scheduling Priority

2007-01-16 Thread brian
If you VLIST it, the RQM compiles to Sleep 1.

Brian

The RQM statement has not appeared in any universe documentation at
least as far back v6.  I actually had to locate some old prime manuals
to find out what this was statement was all about.  I recall reading
some blurb somewhere that although RQM is still supported by the
universe compiler it is in effect a NOP and doesn't actually do anything
on any platform.

Gerry

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod
Sent: January 15, 2007 1:08 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Basic Program Scheduling Priority

RQM releases the remainder of a process's timeslice on the CPU.  Not
100% certain it works on Windows platforms.  (Release QuantuM)

PERFORM CHAP DOWN will reduce the process's priority.  This works on
all platforms.  (Note: you can not CHAP UP unless you have Administrator
privileges.)  Check out HELP CHAP for more.  (CHAnge Priority)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Basic Program Scheduling Priority

2007-01-16 Thread MAJ Programming
I would believe that whatever entity it was releasing circa 1975 is clearly
a non-issue now. I believe the concept was spokes on a wheel where each
slice was a user's exclusive use of the processor and the RQM caused your
pie slice to conclude and you had to wait until it went around again.

It made sense with the TIMESLICE command to increase your 'slice'.

If the concept of the processor managing the users in such a circular
fashion (albeit screamingly faster) then releasing one's 'slice' would be so
incrementally tiny that it would not even matter. One could argue that the
NULL command is equally long in its duration.

My 1 slice
Mark Johnson

This reminds me of the stupid guy who ordered a pizza and asked to have it
cut in 6 pieces because he wasn't hungry enough for 8.
- Original Message -
From: gerry-u2ug [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Monday, January 15, 2007 8:34 AM
Subject: RE: [U2] [UV] Basic Program Scheduling Priority


 The RQM statement has not appeared in any universe documentation at
 least as far back v6.  I actually had to locate some old prime manuals
 to find out what this was statement was all about.  I recall reading
 some blurb somewhere that although RQM is still supported by the
 universe compiler it is in effect a NOP and doesn't actually do anything
 on any platform.

 Gerry

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod
 Sent: January 15, 2007 1:08 AM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] [UV] Basic Program Scheduling Priority

 RQM releases the remainder of a process's timeslice on the CPU.  Not
 100% certain it works on Windows platforms.  (Release QuantuM)

 PERFORM CHAP DOWN will reduce the process's priority.  This works on
 all platforms.  (Note: you can not CHAP UP unless you have Administrator
 privileges.)  Check out HELP CHAP for more.  (CHAnge Priority)
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Basic Program Scheduling Priority

2007-01-15 Thread gerry-u2ug
The RQM statement has not appeared in any universe documentation at
least as far back v6.  I actually had to locate some old prime manuals
to find out what this was statement was all about.  I recall reading
some blurb somewhere that although RQM is still supported by the
universe compiler it is in effect a NOP and doesn't actually do anything
on any platform.

Gerry

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod
Sent: January 15, 2007 1:08 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Basic Program Scheduling Priority

RQM releases the remainder of a process's timeslice on the CPU.  Not
100% certain it works on Windows platforms.  (Release QuantuM)

PERFORM CHAP DOWN will reduce the process's priority.  This works on
all platforms.  (Note: you can not CHAP UP unless you have Administrator
privileges.)  Check out HELP CHAP for more.  (CHAnge Priority)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Basic Program Scheduling Priority

2007-01-15 Thread Timothy Snyder
 I recall reading
 some blurb somewhere that although RQM is still supported by the
 universe compiler it is in effect a NOP and doesn't actually do anything
 on any platform.

Not true.  On UniData, the documentation for RQM includes the following: 
RQM is a synonym for the SLEEP function. For more information, see SLEEP. 
 If you check TIME() or SYSTEM(12) before and after an RQM statement, 
you'll see that, without any parameters, RQM will generate a SLEEP 1. 
Although not documented as such for UniVerse, this will act the same way.

Years back, I was working on Sequoia Pick O/A and was looking into a 
program that was suddenly taking a long time.  I came across a bunch of 
RQM statements and talked to the programmer who was working on the program 
to see what they were all about.  He said that they forced a screen flush 
so a record counter would be up to date.  I slapped together a small test 
program and demonstrated that this was actually doing a one-second sleep, 
which was happening pretty frequently.  (Well, yes, it did flush the 
screen, too.)  I replaced all of the RQMs in the program with CRT 
CHAR(0):, which forced a screen flush on O/A, and the program sped up 
drastically.

So anyway, this shouldn't be treated as a NOP.  If you come across 
something like this in a program, get rid of it, unless the desired effect 
is actually to sleep for a second.  I can't speak to other platforms, but 
for Pick O/A, UniData, and UniVerse, that's what you'll get.


Tim Snyder
Consulting I/T Specialist
U2 Consulting
North American Lab Services
IBM Software Group
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Basic Program Scheduling Priority

2007-01-15 Thread Perry Taylor
Thanks to everyone for their suggestions.

The CHAP command was exactly what I was looking for (thanks Martin and
Ray).  Many years ago I had used the General Automation R91 BASIC
statement CHAP and actually had looked in the UniVerse BASIC manual for
it.  It never occurred to me to look for a UniVerse command-line
equivalent.  I will give it a try.

BTW.. Does anyone know how to tell if a process has been CHAP'd up or
down?  CHAP does not appear to return anything of value to tell you
about what it has done. ???

Thanks again!

Perry 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of gerry-u2ug
Sent: Monday, January 15, 2007 8:34 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Basic Program Scheduling Priority

The RQM statement has not appeared in any universe documentation at
least as far back v6.  I actually had to locate some old prime manuals
to find out what this was statement was all about.  I recall reading
some blurb somewhere that although RQM is still supported by the
universe compiler it is in effect a NOP and doesn't actually do anything
on any platform.

Gerry

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod
Sent: January 15, 2007 1:08 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Basic Program Scheduling Priority

RQM releases the remainder of a process's timeslice on the CPU.  Not
100% certain it works on Windows platforms.  (Release QuantuM)

PERFORM CHAP DOWN will reduce the process's priority.  This works on
all platforms.  (Note: you can not CHAP UP unless you have Administrator
privileges.)  Check out HELP CHAP for more.  (CHAnge Priority)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health Information, 
any communications containing such material will be returned to the originating 
party with such advisement noted. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Basic Program Scheduling Priority

2007-01-14 Thread Martin Phillips

Hi Perry,


Is anyone aware of way for a UniVerse BASIC program to
change it's own processing priority?  Something akin to
getpriority()/setpriority() is C?


Try the CHAP command.


Martin Phillips, Ladybridge Systems Ltd
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Basic Program Scheduling Priority {Unclassified}

2007-01-14 Thread HENDERSON MIKE, MR
Perry,

NAP takes milliseconds as its parameter, but, at least on Windows
platforms, NAP 1 does not sleep for 1 millisecond, but actually for
about 15 milliseconds.  

It seems that there is a fundamental clock somewhere in the UV Basic
runtime environment on Windows that only 'ticks' about once every
15-and-a-bit milliseconds (I think 15.3 ms from memory).
You can demonstrate this by getting TIME() in a tight loop and seeing
the values and how they change.  You get the same value returned again
and again, then it will jump up by 15 or 16 milliseconds. This has been
the case at least across 9.6, 10.0 and 10.1 - I haven't tried 10.2 yet.

I'd be interested if someone could try this on a Unix / Linux platform
and see if they observe the same phenomenon, or if it's a Windows
Special Feature (TM) ;-)
Code to do it is below.

Regards


Mike

 Begin program code 
* PROGRAM MIKE.SMALLEST.TICK
*
* What is the shortest time interval that you can NAP?
* What is the smallest increment value for TIME()? 
*
  THE.START = TIME()
  CRT 'THE.START ':QUOTE(THE.START):' [':OCONV(THE.START,'MTS'):']'
*
*

-
*
* MINIMUM 'NAP'
*
  DIM TIME.ARRAY(1)
  MAT TIME.ARRAY = ''
  FOR KK = 1 TO 1
 TIME.ARRAY(KK) = TIME()
 NAP 1
  NEXT KK
  NAP.END = TIME()
  CRT 'NAP.END ':QUOTE(NAP.END)
*
  MIN.DIFF = 999.999
  MAX.DIFF = 0
  DIM DIFF.ARRAY()
  MAT DIFF.ARRAY = ''
  TOT.DIFF = 0
  FOR KK = 2 TO 1
 THE.DIFF = TIME.ARRAY(KK) - TIME.ARRAY(KK-1)
 IF THE.DIFF GT MAX.DIFF THEN MAX.DIFF = THE.DIFF
 IF THE.DIFF LT MIN.DIFF THEN MIN.DIFF = THE.DIFF
 DIFF.ARRAY(KK-1) = THE.DIFF
 TOT.DIFF += THE.DIFF
  NEXT KK
*
  AVERAGE.DIFF = TOT.DIFF / 
  INT.AVERAGE.DIFF = INT((AVERAGE.DIFF * 10) + 0.5)
*
  CRT 'Average elapsed time of NAP 1 is ':OCONV(INT.AVERAGE.DIFF,
MD2):' milliseconds'
  CRT ' Minimum value of NAP 1 is ':MIN.DIFF*1000:'
milliseconds'
  CRT ' Maximum value of NAP 1 is ':MAX.DIFF*1000:'
milliseconds'
*
*

-
*
* SMALLEST INCREMENT OF TIME()
*
  MAT TIME.ARRAY = ''
  FOR KK = 1 TO 1000
 LAST.TIME = TIME()
 THIS.TIME = LAST.TIME
 LOOP
 UNTIL THIS.TIME NE LAST.TIME
THIS.TIME = TIME()
 REPEAT
 TIME.ARRAY(KK) = THIS.TIME
  NEXT KK
  TIME.END = TIME()
  CRT 'TIME.END ':QUOTE(TIME.END):' [':OCONV(TIME.END,'MTS'):']'
*
  MIN.DIFF = 999.999
  MAX.DIFF = 0
  MAT DIFF.ARRAY = ''
  TOT.DIFF = 0
  FOR KK = 2 TO 1000
 THE.DIFF = TIME.ARRAY(KK) - TIME.ARRAY(KK-1)
 IF THE.DIFF GT MAX.DIFF THEN MAX.DIFF = THE.DIFF
 IF THE.DIFF LT MIN.DIFF THEN MIN.DIFF = THE.DIFF
 DIFF.ARRAY(KK-1) = THE.DIFF
 TOT.DIFF += THE.DIFF
  NEXT KK
*
  AVERAGE.DIFF = TOT.DIFF / 999
  INT.AVERAGE.DIFF = INT((AVERAGE.DIFF * 10) + 0.5)
*
  CRT 'Average difference of TIME() is ':OCONV(INT.AVERAGE.DIFF,
MD2):' milliseconds'
  CRT 'Minimum difference of TIME() is ':MIN.DIFF*1000:'
milliseconds'
  CRT 'Maximum difference of TIME() is ':MAX.DIFF*1000:'
milliseconds'
*
  TOT.DEV.SQUARED = 0
  FOR KK = 1 TO 999
 THIS.DEV = AVERAGE.DIFF - DIFF.ARRAY(KK)
 TOT.DEV.SQUARED += (THIS.DEV * THIS.DEV)
  NEXT KK
*
*

-
*
  STOP
*
   END
- End program code -

 -Original Message-
 From: [EMAIL PROTECTED] On Behalf Of Buss, Troy
(Logitek Systems)
 Sent: Sunday, 14 January 2007 09:30
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] [UV] Basic Program Scheduling Priority
 
 Take a look at the NAP statement in UniVerse basic.  I 
 believe it takes tenths or milliseconds as a parameter.
 
 -Troy
 
 Perry Taylor wrote:
  I have several BASIC processes that are quite CPU intensive which I
  would like to slow themselves down a bit so the don't take so much
  processor time.  Is anyone aware of way for a UniVerse BASIC program
to
  change it's own processing priority?  Something akin to
  getpriority()/setpriority() is C?
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or 
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Basic Program Scheduling Priority

2007-01-14 Thread Ray Wurlod
RQM releases the remainder of a process's timeslice on the CPU.  Not 100% 
certain it works on Windows platforms.  (Release QuantuM)

PERFORM CHAP DOWN will reduce the process's priority.  This works on all 
platforms.  (Note: you can not CHAP UP unless you have Administrator 
privileges.)  Check out HELP CHAP for more.  (CHAnge Priority)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Basic Program Scheduling Priority

2007-01-13 Thread Buss, Troy \(Logitek Systems\)
Take a look at the NAP statement in universe basic.  I believe it takes
tenths or milliseconds as a parameter.

-Troy
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Basic Program Scheduling Priority

2007-01-13 Thread Allen Egerton

Perry Taylor wrote:

I have several BASIC processes that are quite CPU intensive which I
would like to slow themselves down a bit so the don't take so much
processor time.  Is anyone aware of way for a UniVerse BASIC program to
change it's own processing priority?  Something akin to
getpriority()/setpriority() is C?


If you don't find a way to change their timeslice or priority, perhaps 
sleeping might be the answer.


Either an execute of SLEEP, or more appropriately a call to !SLEEP$ 
subroutine.  I say more appropriately because you can include logic to 
vary the sleep interval.


HTH.

--
Allen Egerton   aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/