当前位置:网站首页>Tencent always takes epoll, which is annoying
Tencent always takes epoll, which is annoying
2022-07-01 12:41:00 【Tao song remains the same】
Tencent takes the exam every time during the interview epoll, No kidding , Very annoying .
Many interviewers' own knowledge does not evolve , I only remember one every day epoll, What else ?
[email protected]:~$ man epoll
EPOLL(7) Linux Programmer's Manual EPOLL(7)
NAME
epoll - I/O event notification facility
SYNOPSIS
#include <sys/epoll.h>
DESCRIPTION
The epoll API performs a similar task to poll(2): monitoring multiple file descriptors to see if I/O is possible on any of
them. The epoll API can be used either as an edge-triggered or a level-triggered interface and scales well to large num[m
bers of watched file descriptors. The following system calls are provided to create and manage an epoll instance:
* epoll_create(2) creates an epoll instance and returns a file descriptor referring to that instance. (The more recent
epoll_create1(2) extends the functionality of epoll_create(2).)
* Interest in particular file descriptors is then registered via epoll_ctl(2). The set of file descriptors currently reg[m
istered on an epoll instance is sometimes called an epoll set.
* epoll_wait(2) waits for I/O events, blocking the calling thread if no events are currently available.
Level-triggered and edge-triggered
The epoll event distribution interface is able to behave both as edge-triggered (ET) and as level-triggered (LT). The dif[m
ference between the two mechanisms can be described as follows. Suppose that this scenario happens:
1. The file descriptor that represents the read side of a pipe (rfd) is registered on the epoll instance.
2. A pipe writer writes 2 kB of data on the write side of the pipe.
3. A call to epoll_wait(2) is done that will return rfd as a ready file descriptor.
4. The pipe reader reads 1 kB of data from rfd.
5. A call to epoll_wait(2) is done.Actually , This is the title of the eight part essay , It doesn't mean much. .
边栏推荐
- [Yu Yue education] financial management reference materials of Ningbo University of Finance and Economics
- Using burpsuite to capture app packages
- [brain opening] west tide and going to the world series
- Ansible Playbook
- 题目 2612: 蓝桥杯2021年第十二届省赛真题-最少砝码(枚举找规律+递推)
- 系统测试UI测试总结与问题(面试)
- Interpretation of hard threshold function [easy to understand]
- ASP.NET Core 6 从入门到企业级实战开发应用技术汇总
- [Suanli network] technological innovation of Suanli Network -- key technology of operation service
- List of QT players [easy to understand]
猜你喜欢

Switch basic experiment

ROS2 Foxy depthai_ros教程

第十四章 信号(四)- 多进程任务示例

Ipv6-6to4 experiment
![79. Word search [DFS + backtracking visit + traversal starting point]](/img/d6/a7693b2af435b7cf4562161ca4bd3f.png)
79. Word search [DFS + backtracking visit + traversal starting point]

基于开源流批一体数据同步引擎 ChunJun 数据还原 —DDL 解析模块的实战分享
![leetcode:329. The longest incremental path in the matrix [DFS + cache + no backtracking + elegance]](/img/10/acd162c3adf9d6f14fa5a551dc0d25.png)
leetcode:329. The longest incremental path in the matrix [DFS + cache + no backtracking + elegance]

手机便签应用

IOS interview
![leetcode:241. Design priority for operation expression [DFS + Eval]](/img/d0/8dedeba7ecedccd25e0e3e96ff3362.png)
leetcode:241. Design priority for operation expression [DFS + Eval]
随机推荐
Compile and debug net6 source code
使用BurpSuite对app抓包教程
Chapter 14 signals (IV) - examples of multi process tasks
Interpretation of hard threshold function [easy to understand]
工具箱之 IKVM.NET 项目新进展
腾讯安全联合毕马威发布监管科技白皮书,解析“3+3”热点应用场景
MySQL的零拷贝技术
[Maui] add click events for label, image and other controls
BIM and safety in road maintenance-buildSmart Spain
R语言基于h2o包构建二分类模型:使用h2o.gbm构建梯度提升机模型GBM、使用h2o.auc计算模型的AUC值
leetcode:241. 为运算表达式设计优先级【dfs + eval】
Like the three foot platform
单点登录SSO与JWT好文整理
Digital signal processing -- Design of linear phase (Ⅱ, Ⅳ) FIR filter (2)
Efforts at the turn of the decade
ASP.NET Core 6 从入门到企业级实战开发应用技术汇总
Good luck brought by years of persistence
(混更一篇)多个txt文本转一个表格
leetcode:241. Design priority for operation expression [DFS + Eval]
天青色等烟雨