[20190402]关于semtimedop函数调用2.txt

--//前几天做了sql语句在mutexes上的探究.今天看看_mutex_wait_time设置很大的情况下是否semtimedop会唤醒.

1.环境:
SYS@book> @ hide mutex
NAME                DESCRIPTION        DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
------------------- ------------------ ------------- ------------- ------------
_mutex_spin_count   Mutex spin count   TRUE          255           255
_mutex_wait_scheme  Mutex wait scheme  TRUE          2             2
_mutex_wait_time    Mutex wait time    TRUE          1             1

--//注:_mutex_wait_time=1,相当1厘秒.
SCOTT@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

$ cat m2.txt
set verify off
column a noprint new_value v_a;
--select mod ( &&3 ,3) a  from dual ;
--alter session set optimizer_index_cost_adj= &&3;
host sleep $(echo &&3/50| bc -l )
insert into job_times values ( sys_context ('userenv', 'sid') ,dbms_utility.get_time ,'&&2') ;
commit ;
declare
v_id number;
v_d date;
begin
    for i in 1 .. &&1 loop
        --select  1 into v_id from dual ;
        --select  sysdate into v_d from dual ;
        select deptno into v_id from dept where deptno=10;
    end loop;
end ;
/
update job_times set time_ela = dbms_utility.get_time - time_ela where sid=sys_context ('userenv', 'sid') and method='&&2';
commit;
--quit

$ seq 150 | xargs -I {}  -P 150 bash -c  "sqlplus -s -l scott/book @m2.txt 1e6 f2_150 {} >/dev/null"

SYS@book> @ mutexy 6 a31kd5tkdvvmm
      HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099       5256  600010918 kksfbc [KKSCHLPIN1]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

--//MUTEX_ADDR=000000007C88E330.

2.测试:
--//session 1:
SCOTT@book> @ spid
       SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
       295          5 65222                    DEDICATED 65223       21          3 alter system kill session '295,5' immediate;

--//session 2:
SYS@book> alter system set "_mutex_wait_scheme"=2 scope=memory;
System altered.

SYS@book> alter system set "_mutex_wait_time"=100000;
alter system set "_mutex_wait_time"=100000
*
ERROR at line 1:
ORA-00068: invalid value 100000 for parameter _mutex_wait_time, must be between 0 and 65535
--//在0-65536之间.

SYS@book> alter system set "_mutex_wait_time"=1000;
System altered.
--//相当于10秒.

--//session 2:       
SYS@book> oradebug setmypid
Statement processed.

SYS@book> oradebug peek 0x000000007C88E330 8
[07C88E330, 07C88E338) = 00000000 00000000

SYS@book> oradebug poke 0x000000007C88E330 8 0x0000000200000127
BEFORE: [07C88E330, 07C88E338) = 00000000 00000000
AFTER:  [07C88E330, 07C88E338) = 00000127 00000002

--//session 1:
SCOTT@book> @ m2.txt 1 c1 0
1 row created.
Commit complete.
--//挂起!!

3.监测:
$ strace -frT -p 65223
....
     4.001032 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000065>
     0.000156 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
     0.000122 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000687>
     3.000815 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.001003>
     3.001148 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000630>
     4.000734 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000064>
     0.000156 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
     0.000122 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000950>
     3.001082 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000722>
     3.000865 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000592>
     4.000697 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000061>
     0.000152 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
     0.000121 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000734>
     3.000862 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.001028>
     3.001176 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000716>
--//可以看出非常像dbms_lock.sleep调用,被拆分3,3,4秒分别执行.
--//但是我并没有看解除阻塞后唤醒的情况,我测试多次.
SYS@book> oradebug poke 0x000000007C88E330 8 0x0000000200000127
BEFORE: [07C88E330, 07C88E338) = 00000000 00000000
AFTER:  [07C88E330, 07C88E338) = 00000127 00000002
-----------------------------------
     4.000819 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000062>
     0.000153 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
     0.000124 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000019>
     0.000087 times({tms_utime=52174, tms_stime=5472, tms_cutime=0, tms_cstime=0}) = 10874034811 <0.000019>
     0.000076 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000020>
     0.000097 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000017>
     0.000087 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000020>
     0.000134 getrusage(RUSAGE_SELF, {ru_utime={521, 749681}, ru_stime={54, 729679}, ...}) = 0 <0.000020>

--//另外我注意一个细节,如果设置_mutex_wait_time>1的情况下,就会出现指数回退的情况,以下是10秒的情况.
_mutex_wait_scheme = 0                        – Always YIELD
_mutex_wait_scheme = 1 & _mutex_wait_time = t – Always SLEEP for t milli-seconds (default)
_mutex_wait_scheme = 2 & _mutex_wait_time = t – EXP BACKOFF with maximum sleep
---------------------
$ strace -frT -p 65223 -e semtimedop,getrusage
Process 65223 attached - interrupt to quit
     0.000000 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000036>
     0.000250 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000096 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000199 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
     0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000152 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000131 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000201 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000108 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000100 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000703 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000020>
     0.000227 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
     0.000109 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000478 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
     0.000177 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000149 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000145 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000108 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000136 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000104 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000109 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000342 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000019>
     0.000205 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000123 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
     0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
     0.000968 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000243 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
     0.000128 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000173 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000172 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000164 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
     0.000160 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
     0.000176 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000021>
     0.000122 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000117 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000206 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
     0.000129 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000021>
     0.000160 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
     0.000309 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010902>
     0.011073 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010790>
     0.010927 semtimedop(309952512, 0x7fff28087160, 1, {0, 30000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.030891>
     0.031029 semtimedop(309952512, 0x7fff28087160, 1, {0, 70000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.070846>
     0.070985 semtimedop(309952512, 0x7fff28087160, 1, {0, 120000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.120839>
     0.120948 semtimedop(309952512, 0x7fff28087160, 1, {0, 110000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.110910>
     0.111058 semtimedop(309952512, 0x7fff28087160, 1, {0, 200000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.200888>
     0.201025 semtimedop(309952512, 0x7fff28087160, 1, {0, 150000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.150867>
     0.151005 semtimedop(309952512, 0x7fff28087160, 1, {0, 320000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.320891>
     0.321029 semtimedop(309952512, 0x7fff28087160, 1, {0, 310000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.310879>
--//实际上阻塞的情况下.睡眠的时间间隔开始一直在增加.从1,1,3,7,12,11,20,15,32,31cs增加.
     0.311003 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
     0.311003 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
     0.000157 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
     0.000187 semtimedop(309952512, 0x7fff28087160, 1, {0, 640000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.640510>
     0.640646 semtimedop(309952512, 0x7fff28087160, 1, {0, 670000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.670902>
     0.671039 semtimedop(309952512, 0x7fff28087160, 1, {1, 320000000}) = -1 EAGAIN (Resource temporarily unavailable) <1.320895>
--//这里也是 64,67,132
     1.321017 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000148 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
     0.000152 semtimedop(309952512, 0x7fff28087160, 1, {1, 310000000}) = -1 EAGAIN (Resource temporarily unavailable) <1.310542>
--//这里也是 131 ,后面还有.
     1.310665 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000145 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
     0.000149 semtimedop(309952512, 0x7fff28087160, 1, {2, 600000000}) = -1 EAGAIN (Resource temporarily unavailable) <2.600601>
     2.600719 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000131 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
     0.000149 semtimedop(309952512, 0x7fff28087160, 1, {2, 710000000}) = -1 EAGAIN (Resource temporarily unavailable) <2.710794>
     2.710915 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
     0.000147 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
     0.000156 semtimedop(309952512, 0x7fff28087160, 1, {5, 280000000}) = -1 EAGAIN (Resource temporarily unavailable) <5.280287>
     5.280409 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000151 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
     0.000151 semtimedop(309952512, 0x7fff28087160, 1, {5, 270000000}) = -1 EAGAIN (Resource temporarily unavailable) <5.270622>
--//527cs
     5.270746 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
     0.000153 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
     0.000151 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000675>
     3.000791 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000792>
     3.000935 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.001177>
--//从这里开始等10秒pin 255次.    
     4.001331 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
     0.000151 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
     0.000161 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000379>
     3.000496 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000744>
     3.000882 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000976>
     4.001137 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
     0.000157 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
     0.000159 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000474>
     3.000592 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000800>
     3.000943 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.001361>
     4.001510 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
     0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
     0.000176 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
     0.000162 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
     0.000140 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>

--//_mutex_wait_time=2的情况,不是很明显,仅仅执行2次semtimedop sleep 0.01秒的情况.
65223      0.000106 getrusage(RUSAGE_SELF, {ru_utime={522, 312596}, ru_stime={54, 819666}, ...}) = 0 <0.000024>
65223      0.000140 getrusage(RUSAGE_SELF, {ru_utime={522, 312596}, ru_stime={54, 819666}, ...}) = 0 <0.000023>
65223      0.000237 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010283>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65223      0.010404 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010921>
65223      0.011033 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020893>
65223      0.021011 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020881>
65223      0.020998 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020877>
65223      0.020993 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020885>
    
--//再来看看sleep记数:
$ sqlplus -s -l / as sysdba <<EOF
> $(seq 1000| xargs -I {} echo -e "@ mutexy 5 a31kd5tkdvvmm\nhost sleep 10\n")
> EOF

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166910  600017934 kksfbc [KKSCHLPIN1]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166942  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166948  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166952  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166954  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166956  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

HASH SUM_SLEEPS   SUM_GETS LOCATION                       MUTEX_TYPE           MUTEX_ADDR       SQLID         KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099  161166958  600047254 kkslce [KKSCHLPIN2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6]     Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099    2183544 4.4733E+10 kksfbc [KKSCHLFSP2]            Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099          6   45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin           000000007C88E330 a31kd5tkdvvmm          SELECT DEPTNO FROM DEPT WHERE DEPTNO=10

--//sleep计数与getrusage调用有关,后面增加都是2次.

[20190402]关于semtimedop函数调用2.txt的更多相关文章

  1. [20190401]关于semtimedop函数调用.txt

    [20190401]关于semtimedop函数调用.txt --//上个星期测试,链接http://blog.itpub.net/267265/viewspace-2639675/--//关于sql ...

  2. [20190401]跟踪dbms_lock.sleep调用.txt

    [20190401]跟踪dbms_lock.sleep调用.txt --//自己在semtimedop函数调用理解错误,加深理解,跟踪dbms_lock.sleep调用的情况. 1.环境:SCOTT@ ...

  3. [20190401]隐含参数_mutex_spin_count.txt

    [20190401]隐含参数_mutex_spin_count.txt --//上午做了一些测试关于semtimedop函数调用,发现自己上个星期在一些问题上理解错误.--//相关链接:--//htt ...

  4. Linux内核配置选项

    http://blog.csdn.net/wdsfup/article/details/52302142 http://www.manew.com/blog-166674-12962.html Gen ...

  5. [20190402]对比_mutex_wait_scheme不同模式cpu消耗.txt

    [20190402]对比_mutex_wait_scheme不同模式cpu消耗.txt --//前几天做了sql语句在mutexes上的探究.今天对比不同_mutex_wait_scheme模式cpu ...

  6. [20190402]Library Cache mutex.txt

    [20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING                    VERSION   ...

  7. [20190418]exclusive latch spin count.txt

    [20190418]exclusive latch spin count.txt--//昨天测试"process allocation" latch,主要这个latch与其它拴锁s ...

  8. 用 Graphviz+pvtrace 可视化函数调用

    最近在想怎么把一个程序的函数调用关系快速的用流程图的方式画出来,之后看到了这个一篇文章“用 Graphviz 可视化函数调用”(http://www.ibm.com/developerworks/cn ...

  9. 为何C语言(的函数调用)需要堆栈,而汇编语言不需要

    转自:Uboot中start.S源码中指令级的详尽解析 green-waste为何 C 语言(的函数调用)需要堆栈,而汇编语言却需要堆栈之前看了很多关亍uboot的分析,其中就有说要为C语言的运行,准 ...

随机推荐

  1. 可能是史上最全的机器学习和Python(包括数学)速查表

    新手学习机器学习很难,就是收集资料也很费劲.所幸Robbie Allen从不同来源收集了目前最全的有关机器学习.Python和相关数学知识的速查表大全.强烈建议收藏! 机器学习有很多方面. 当我开始刷 ...

  2. Javassist字节码增强示例

    概述 Javassist是一款字节码编辑工具,可以直接编辑和生成Java生成的字节码,以达到对.class文件进行动态修改的效果.熟练使用这套工具,可以让Java编程更接近与动态语言编程. 下面一个方 ...

  3. CentOS7 安装 MySQL

    一.首先检查 MySQL 是否已安装 yum list installed | grep mysql 如果有的话 就全部卸载 yum -y remove +数据库名称 二.MySQL 依赖 libai ...

  4. PAT1120: Friend Numbers

    1120. Friend Numbers (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Two in ...

  5. Spring MVC温故而知新-从零开始

    Spring MVC简介 Spring MVC是一款基于MVC架构模式的轻量级Web框架,目的是将Web开发模块化,对整体架构进行解耦. Spring MVC有一下优点: 作为Spring框架的一部分 ...

  6. Linux内核参数调优

    用法: vim /etc/sysctl.conf #修改内容 sysctl -p #生效 相关参数仅供参考,具体数值还需要根据机器性能,应用场景等实际情况来做更细微调整.   net.core.net ...

  7. OAuth 2.0 认证的原理与实践

    摘要: 使用 OAuth 2.0 认证的的好处是显然易见的.你只需要用同一个账号密码,就能在各个网站进行访问,而免去了在每个网站都进行注册的繁琐过程. 本文将介绍 OAuth 2.0 的原理,并基于 ...

  8. 按钮组,导航条选中其中一个后添加Class突出元素

    $(document).on("click",".modalnavtop",function(e){ $(".modalnavtop").e ...

  9. scrapy顺序执行多个爬虫

    # -*- coding:utf-8 -*- from scrapy import cmdline from scrapy.cmdline import execute import sys,time ...

  10. python3[爬虫实战] 使用selenium,xpath爬取京东手机

    使用selenium ,可能感觉用的并不是很深刻吧,可能是用scrapy用多了的缘故吧.不过selenium确实强大,很多反爬虫的都可以用selenium来解决掉吧. 思路: 入口: 关键字搜索入口 ...