The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
USN-813-3: apr-util vulnerability iBot Security Advisories (RSS) 0 08-08-2009 02:15 AM
util-linux upgrade with interruption? itik Red Hat 3 07-03-2009 03:48 PM
USN-786-1: apr-util vulnerabilities iBot Security Advisories (RSS) 0 06-10-2009 04:30 PM
Mac OS: Long Delay Before Web Pages Start to Load, Then Load Suddenly at Normal Speed iBot OS X Support RSS 0 09-27-2008 07:12 AM
Need help in wrting Load Script for a Load-Resume type of load. ankitgupta Shell Programming and Scripting 1 11-10-2006 12:46 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 1 Week Ago
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
No, the process in the state I describe will be counted against the load. Part of the problem is that these stats must be computed very quickly and the process table is the only structure referenced for the computation of the load. Whether or not to count it depends on its wait priority and this is too simple minded to get it right all the time. Other short cuts are taken during the computation of the load averages. It does not have all of the observations over the past 15 minutes available. So a moving average is computed (but without using floating point arithmetic which is considered to be too slow). Still it is generally a very useful set of statistics.

My descriptions are not based on the most recent source code and its possible that some stuff has changed. When I looked at the code there was no halting or fiddling with the frequency. I hoped to dance around this by presenting a description of a very simple fictional system containing only a single cpu. I can't imagine an OS halting a single cpu unless it was for keeps. Underclocking itself is certainly possible though.
  #9 (permalink)  
Old 1 Week Ago
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,378
Just to be sure, are you telling a major page fault do not necessarily put the affected thread in the i/o wait queue ? Seems quite odd to me.
Also, are you sure the process table is walked to compute the load ? My understanding is the cpu partition (aka processor set) tables are used instead.

About CPU halting, here is an interesting blog:
The most executed code in Solaris ... the cpu idle loop : Bill Holler's blog
  #10 (permalink)  
Old 1 Week Ago
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Quote:
Originally Posted by jlliagre View Post
Just to be sure, are you telling a major page fault do not necessarily put the affected thread in the i/o wait queue ?
Not at all. Again, only the process table is scanned.

Is the process running... if so it counts.
Does the process want a cpu...if so it counts.
Is the process expected to want a cpu very soon...if so it counts.

The sum of these counts is called nrun and it is then used to update the avenrun array.

The i/o wait queue has no influence in this calculation.

In the case of a process awaiting the arrival of a page, it seems to me to make good sense to count it. In the case a process waiting for a mag tape to rewind, it seems to me to not be good sense to count it. However both are counted in nrun.

That 3rd category is processes sleeping with a priority below PZERO. This is same condition that keeps a process alive beyond a "kill -9". A process waiting for a read() system call to complete would not be counted. A process waiting a disk buffer because it is in the middle of a mkdir() call is counted.
  #11 (permalink)  
Old 1 Week Ago
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,378
Sorry to disagree but on what Solaris source code release are you basing these statements ?

I see no reference to the process table in the OpenSolaris published one
Cross Reference: /onnv/onnv-gate/usr/src/uts/common/os/clock.c
and I'm wondering if that would work anyway. A single process can easily generate a much higher load than 1. According to the method you describe, it would only show as 1. Moreover, walking the process table which can contains thousands of entries would be less efficient than using the processor sets run queue sizes as I understand the code is actually doing.
  #12 (permalink)  
Old 1 Week Ago
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
As I said, "My descriptions are not based on the most recent source code and its possible that some stuff has changed."

If you disagree with the algorithm I gave, please give us the algorithm that you think is being used.
  #13 (permalink)  
Old 1 Week Ago
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,378
Okay, so here is my understanding of what is used based on what I can read in the kernel source code.

At every clock interrupt (each 10 ms by default) Solaris walk the kernel per cpu (or per cpu partition since supported) statistics, not the process table. The run queues size and running lightweight processes count are summed to compute the instantaneous load. The i/o wait queue size is not used to compute this load. From these values are computed three moving decayed averages that are available in the avenrun kernel variable and through the kstat interface.

As far as I know, this has been true at least in the last decade. I'm pretty sure Solaris 2.6 already did it that way.

I'm not aware of major faulted threads being accounted as running ones but I'm not denying that might have been implemented with Solaris, I'm just skeptical.

That said, I'm puzzled by the fact you insist challenging/ignoring some of my points given the fact you are one of the most authoritative and reliable poster in this very forum. I would really appreciate if you tell what precise Solaris release you are basing your statements on.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:04 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0