NR_OPEN 与 NR_FILE 的区别

简介: NR_OPEN 与 NR_FILE 的区别 阅读0.11版的内核源码时,在linux-0.11/fs/pipe.c中,函数sys_pipe()里面出现了2个宏定义,NR_OPEN 与 NR_FILE。
+关注继续查看

NR_OPEN NR_FILE 的区别

阅读0.11版的内核源码时,在linux-0.11/fs/pipe.c中,函数sys_pipe()里面出现了2个宏定义,NR_OPEN NR_FILE。下面说明一下它们的区别:

1. NR_OPEN is the maximum number of files that can be opened by process

NR_OPEN是一个进程可以打开的最大文件数。

A process cannot use more than NR_OPEN file descriptors.

一个进程不能使用超过NR_OPEN文件描述符。

The kernel also enforces a dynamic bound on the maximum number of file descriptors in the signal-<rlim[RLIMIT_NOFILE] structure of the process descriptor; this value is usually 1,024, but it can be raised if the process has root privileges.

2. NR_FILE is the limit on total number of files in the system at any given point in time

NR_FILE 是系统在某一给定时刻,限制的文件总数

While initializing the kernel we setup the vfs cache with

start_kernel
vfs_caches_init(num_physpages);
files_init(mempages);

fs/file_table.c says

/* One file with associated inode and dcache is very roughly 1K.
* Per default don't use more than 10% of our memory for files.

n = (mempages * (PAGE_SIZE / 1024)) / 10;
this n can never be greater than NR_FILE

原文

http://blog.chinaunix.net/uid-24807808-id-3077199.html

目录
相关文章
|
2月前
|
调度
R16 NR CDRX
在NR中降低UE功耗一直比较重要,如38.300 power saving 所述,NR 中UE power saving的机制有很多,包含DRX ,BWP adaption, dormancy BWP, DCP(DCI with CRC scrambled by PS-RNTI),跨时隙调度,放松测量等。dormancy BWP和DCP都集中在dormancy BWP中介绍,这篇CDRX也会提及部分内容;放松测量大概内容主要在38.304及38.133,而这篇主要看下CDRX。
|
2月前
|
调度
NR PDCP duplication
PDCP duplication 是PDCP 的一个功能,主要是为满足URLLC 场景的可靠性/延迟要求,而产生的一种提高传输可靠性的机制,具体就是在信号状况比较差的情况下,网络侧通过配置PDCP duplication,可以将相同的PDCP data PDU通过多个RLC 进行发送,通过重复发送的方式实现。R15 版本协议,PDCP duplication 可以将PDCP PDU 复制并通过 2 个 RLC bearer进行传输,PDCP duplication功能可以关联到2个RLC entity;
|
2月前
|
前端开发 索引
NR PDCCH(一) CORESET
PDCCH 是非常重要的信道,基站要通过PDCCH向UE发送DCI,来指示UE进行相应的 UL DL operation 。如果DCI指示的是PDSCH信息,UE要根据DL DCI在PDSCH 上接收下行数据;如果DCI指示的是PUSCH信息,同样的UE要根据UL DCI 指示资源的资源在PUSCH 发送上行数据。
|
8月前
|
Perl
awk NR、F的用法
awk NR、F的用法
52 0
|
9月前
系统编程之文件IO(六)——获取文件属性(stat、fstat、lstat、struct stat)
系统编程之文件IO(六)——获取文件属性(stat、fstat、lstat、struct stat)
系统编程之文件IO(六)——获取文件属性(stat、fstat、lstat、struct stat)
|
5G 调度 数据安全/隐私保护
5G NR SIB1介绍
SIB1携带UE接入小区所需的最关键的信息,例如随机接入参数。SIB1包括关于其他SIB的可用性和调度的信息,例如,其他SIB。
1140 0
|
存储 5G 调度
5G NR 系统消息
此文基于3GPP协议进行总结,主要介绍了MIB和一系列SIB消息属性,发送和获取流程。
484 0
5G NR 系统消息
[20161226]关于sys.seg$.txt
[20161226]关于sys.seg$.txt 1.环境: SYS@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ---------------------...
776 0
|
SQL 测试技术
[20150511]关于11G Direct Path Read.txt
[20150511]关于11G Direct Path Read.txt --前一阵子被别人问到升级到11G要注意那些细节,我给对方讲了审计,用户口令管理(大小写),sql tuning advisor,auto space advisor, --以及Direct Path Read等问题,对方问了很多Direct Path Read相关的问题.
750 0
推荐文章
更多