加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux上的信号量数组是什么?

发布时间:2020-12-13 16:45:34 所属栏目:Linux 来源:网络整理
导读:我理解 semaphores,但是我的Linux机箱上使用的这些信号量数组是什么? $ipcs------ Shared Memory Segments --------key shmid owner perms bytes nattch status 0x00000000 327681 root 644 80 2 0x00000000 360450 root 644 16384 2 0x00000000 393219 roo
我理解 semaphores,但是我的Linux机箱上使用的这些信号量数组是什么?
$ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 327681     root      644        80         2                       
0x00000000 360450     root      644        16384      2                       
0x00000000 393219     root      644        280        2                       
...

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x4172d4f4 290914305  lazer     660        104       
0x3b87b970 291045378  lazer     660        104       
0xa97eb380 293928963  lazer     660        104       
0x1fde2040 294191108  lazer     660        104       

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    

$

还有哪些OS资源可以保护?

解决方法

ipcs -i< SEMID> -s将为您提供有关特定sem数组的更多信息.例如.
[me@home]$ipcs -i 32769 -s

Semaphore Array semid=32769
uid=537  gid=85  cuid=537        cgid=85
mode=0600,access_perms=0600
nsems = 1
otime = Mon Sep 19 12:18:53 2011
ctime = Mon Sep 19 12:07:11 2011
semnum     value      ncount     zcount     pid
0          1          0          0          7548

使用pid来确定谁在使用它.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读