ITPub博客

首页 > Linux操作系统 > Linux操作系统 > internal of sga6

internal of sga6

原创 Linux操作系统 作者:tompson1983 时间:2010-02-22 13:03:49 0 删除 编辑
Sessions:
       
   Struct ksusg                                       
   -----------     |--------------|------------------->|--------------------------|------------------------------|---------------------------------
   | ksusg_  |---->|              |                    |--------------------------|------------------------------|---------------------------------|
   -----------     |              |                                               
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|                                                                                       |
                   |              |                   
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |                   
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   |              |                    ---------------------------|------------------------------|---------------------------------|
                   |              |
                   |--------------|------------------->|--------------------------|------------------------------|---------------------------------
                   | ............ |                    ---------------------------|------------------------------|---------------------------------|
                   | ............ |Array of pointers             |                               |                                 |
                   | ............ |                          x$ksuse                          x$ksusesta                         x$ksusecst
                   | ............ |                          v$session                        v$session                          v$session_wait
                    Struct ksusg

            
---------------------
三.三.二.Segmented Arrays
1.概述:X$KSMDD                                           --Segmented Arrays Fixed view
*.Segemented Array Used to store arrays of objects:                                       -Segmented Array用作存储数组对象的原由:
                                                  .Array too large to fit in granule      -Array数组太大不能存储在Granule这样的单位中
                                                  .Array may grow dynamically             -Array数组可能需要动态增长
                                                 
*.Objects using segmented arrays include:                                          -使用Segmented Array的对象有:
                                                  .enqueues (locks)                                            -Enqueue(lock)队列,锁  
                                                  .enqueue resources (resources)                               -队列资源,资源
                                                  .transactions                                                -事务
                                                  .transaction branches                                        -事务分枝(枝干)
                                                 
*.Segmented arrays managed recursively by segmented array                         -Segmented Array被Segmented Array递归                                                 
*.Segmented arrays externalised in X$KSMDD                                        -Segment Array可以由x$ksmdd查询
*.X$KSMDD
  Externalises segmented array headers
                       |---------------------|-------------|
                       |ADDR                 |RAW(4)       |
                       |INDX                 |NUMBER       |
                       |INST_ID              |NUMBER       |
                       |NAME                 |VARCHAR2(30) | --name of array
                       |ELEMENTS_CHUNK       |NUMBER       |
                       |ITEMS_PT             |NUMBER       |
                       |INITENTRIES          |NUMBER       |
                       |NUMENTRIES           |NUMBER       |
                       |CURENTRIES           |NUMBER       |
                       |NUMCHUNKS            |NUMBER       |--number of chunks
                       |ELEMSIZE             |NUMBER       |
                       |FLAGS                |NUMBER       |
                       |HEAP                 |RAW(4)       |--Address of parent heap
                       |SECONDARY            |RAW(4)       |
                       -------------------------------------
                         
SQL> select * from x$ksmdd where name like '%transaction%' or name like '%lock%' or name like '%enqueue%';                                                                  
                                                                                                                                                                            
ADDR           INDX    INST_ID NAME                           ELEMENTS_CHUNK   ITEMS_PT INITENTRIES NUMENTRIES CURENTRIES  NUMCHUNKS   ELEMSIZE      FLAGS HEAP     SECONDARY
-------- ---------- ---------- ------------------------------ -------------- ---------- ----------- ---------- ---------- ---------- ---------- ---------- -------- ---------
301E94C8          3          1 enqueue                                    32        512       13376      13376         25        418         80          0 2000002C 00      
30317E2C          4          1 enqueue resources                          32        512        5088       5088       1433        159         76          0 2000002C 00      
2FB6E6A8         19          1 OS file lock                               64        512          64         64          0          1         28          0 2000002C 00      
2F034018         20          1 FileOpenBlock                              16        512       29872      29872        130       1867        120          0 2000002C 00      
2FB8B394         21          1 FileIdentificatonBlock                      4        512         480        480         24        120        820          0 2000002C 00      
2FBF6130         23          1 block media rcv state object               64        512          64         64          0          1         28          0 2000002C 00      
2EC7F568         28          1 temporary table lock                       16        512          16         16          0          1        132          0 2000002C 00      
2EC7FF40         29          1 DML lock                                   16        512        4864       4864          0        304        160          0 2000002C 00      
2EDE6938         31          1 transaction                                 2        512         110        110          1         55       1296          0 2000002C 00      
2EE0A05C         32          1 transaction                                 2        512         110        110          1         55       1296          0 2000002C 00      
2EE2D780         33          1 transaction                                 2        512         110        110          2         55       1296          0 2000002C 00                                
2EE50EA4         34          1 transaction                                 2        512         110        110          4         55       1296          0 2000002C 00                                
2EE745C8         35          1 transaction                                 2        512         110        110          1         55       1296          0 2000002C 00                                
2EE97CEC         36          1 transaction                                 2        512         110        110          0         55       1296          0 2000002C 00                                
2EEBB410         37          1 transaction                                 2        512         110        110          1         55       1296          0 2000002C 00                                
2EEDEB34         38          1 transaction                                 2        512         110        110          2         55       1296          0 2000002C 00                                
2EF02258         39          1 transaction                                 2        512         110        110          2         55       1296          0 2000002C 00                                
2EF2597C         40          1 transaction                                 2        512         110        110          0         55       1296          0 2000002C 00                                
2EF490A0         41          1 transaction                                 2        512         110        110          0         55       1296          0 2000002C 00                                

2.Segmented Arrays : Structure Map
          Segmente Array head struct         Various Type of Segmented arrays
          ------------------------             -----------------
          |                      |             |     Call      |    
          |Segmented Array header|------------>|               |                    Segmented Arrays
          |-----------------------             |---------------|                --------------------------------------------
          |                      |             |---------------|--------------->|------|-------|-----|----|----|----|.......
          |Segmented Array header|             |---------------|--------------->--------------------------------------------
          |-----------------------                                              |------|-------|-----|----|----|----|.......
          |                      |
          |Segmented Array header|------------>|----------------|            
          |-----------------------             |                |
          |                      |             |    Enqueues    |     
          |Segmented Array header|             |                |
          |-----------------------             |                |
          |                      |             |----------------|                        Segmented Arrays
          |Segmented Array header|             |----------------|-------------->--------------------------------------------
          |-----------------------             |----------------|               |------|-------|-----|----|----|----|.......
          |                      |             |----------------|-------------->--------------------------------------------
          |Segmented Array header|             |----------------|               |------|-------|-----|----|----|----|.......
          |-----------------------             |----------------|-------------->--------------------------------------------
          |                      |             |----------------|               |------|-------|-----|----|----|----|.......
          |Segmented Array header|             |----------------|-------------->--------------------------------------------
          |-----------------------                                              |------|-------|-----|----|----|----|.......
          |                      |----------->-----------------                                                               
          |Segmented Array header|             |  Euqueue      |                                                               
          |-----------------------             |  Resources    |                         Segmented Arrays                                         
                                               |---------------|                --------------------------------------------   
                                               |---------------|--------------->|------|-------|-----|----|----|----|.......   
                                               |---------------|--------------->--------------------------------------------
                                                     ||||                       |------|-------|-----|----|----|----|.......
                                                     ||||
                                                     ||||
                                               Segement Array具体形式(lock,equenue,transaction..)
       
说明:由Segmented Array Header绝对是什么类型的Segmentd Array,并通过Segmented Array header存储的地址指针指向具体的Segmented Array

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15072844/viewspace-627478/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: internal of sga5
下一篇: internal of sga7
请登录后发表评论 登录
全部评论

注册时间:2009-06-15

  • 博文量
    52
  • 访问量
    85441