<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 4/8/24 18:51, Chris Torek wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:202404090151.4391pJMR034798@elf.torek.net">
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Chris Torek of UofMaryland.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">I got it into 4.3-Reno.  I did not come up with the whole thing but
Rehmi Post and I worked out how to compute %cpu without using floating
point (the original VAX-only version used FP but we had to stop doing
that when we were worried about porting to systems that lacked kernel
access to FP).

The version in current FreeBSD is fancier now though.

Chris
</pre>
    </blockquote>
    <p>Around 1981 I put a similar calculation into 2BSD for the PDP-11
      with no floating point, but this was for the system load average,
      not the %cpu. It just imputes a decimal point in the middle of
      what the processor considers an integer.</p>
    <p></p>
    <div class="moz-signature">Thanks,
      <p>
        <style type="text/css">
table {
   border-spacing: 0px solid white;
   border-collapse:collapse;
}
</style></p>
      <table border="0">
        <tbody>
          <tr>
            <td>
                    <i>Mary Ann Horton</i> (she/her/ma'am)
              <br>
                    Award Winning Author
              <br>
                    <a href="https://maryannhorton.com">maryannhorton.com</a>
            </td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
    </div>
    <br>
  </body>
</html>