Re: [rvm-research] Implementation of setPriority/getPriority for RVMThread (RVM-750)

Carl Ritson <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CAKDym5Mwsu+28Cnrw4WaThhm-qF9Wj3dRuz42fKakMvDCx20cA@mail.gmail.com>
Hi,

> thanks for the patches. We appreciate your contributions.
>
> There was an implementation of RVM-750 in MRP (see
> http://git.codehaus.org/gitweb.cgi?p=mrp.git;a=commitdiff;h=bee01390c061dfbe746f79bd45affdae94529b33).
> Could you comment on the different approaches?

The approach in the linked patch is the same as my patch for systems
where pthread static priority is possible; however, it will have no
effect on Linux.  The linked implementation is incomplete as the
priority of new threads will not be set when they are created, and
getPriority will not return the OS priority of a thread if it has been
set correctly or otherwise.  This is a point for discussion in many
implementations setPriority always succeeds and the result of
getPriority is always the value passed to the last setPriority,
regardless of the OS priority of the thread.  My approach will always
return the OS priority.

> I looked briefly at your patch and have the following questions/suggestions:

> -is the code portable enough? IIRC AIX is the only operating system that
> we support and that you did not test.

It should be portable, although I don't have access to an AIX system to test.

> -Would debugging variables for thread priority (e.g. something
> comparable to "traceAcct" in RVMThread) be useful?

Perhaps, although existing trace variables might be equally applicable.

> -the code of setPriority() in RVMThread would probably be more readable
> if the result of the SysCall was saved to its own variable.

True, and this would be desirable for debugging output.

> -the patch contains trailing whitespace (which leads to checkstyle
> failures).

Ah, sorry about that.
Would you like me to fix this and the above, and provide new patches?

> We need contributor statements to apply the patches. You can also
> provide us with a contributor statement for all contributions (text can
> be found on the bottom of the "Contributions" wiki page with the other
> statements).

---

        STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR

I, Carl Ritson:

(a) represent that either:

  (i) I am the only author and owner of the contributed software
      (described as/entitled setPriority() implementation for RVMThread),
      which was neither derived nor copied from any other software,
  or

 (ii) that any exception to (i) is software which was obtained under the
      EPL (Eclipse Public License),

and

(b)  hereby agree to license this contributed software under the EPL.

---

King regards,

Carl

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.