当前位置:网站首页>腾讯总考epoll, 很烦
腾讯总考epoll, 很烦
2022-07-01 12:33:00 【涛歌依旧】
腾讯面试每次都考epoll, 说真的,很烦。
很多面试官自己的知识不进化,天天只记得个epoll, 还说什么呢?
[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.其实,这就是八股文题目,没啥意思。
边栏推荐
- Interpretation of hard threshold function [easy to understand]
- [Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 4
- Leetcode force buckle (Sword finger offer 31-35) 31 Stack push pop-up sequence 32i II. 3. Print binary tree from top to bottom 33 Post order traversal sequence 34 of binary search tree The path with a
- JS reverse | m3u8 data decryption of a spring and autumn network
- 6.30 simulation summary
- GPS 数据中的精度因子(DOP)与协方差之间的关系 (参考链接)
- MySQL data table creation
- 类的初始化与实例化
- MySQL workbench data modeling function
- Four years after graduation: work, resign, get married, buy a house
猜你喜欢

Chained storage of queues

Message queue monitoring refund task batch process

JS reverse | m3u8 data decryption of a spring and autumn network

Onenet Internet of things platform - the console sends commands to mqtt product devices

Use of easyexcel
![[some notes]](/img/91/7657f90b50f012736579b1585b4ade.jpg)
[some notes]

BIM and safety in road maintenance-buildSmart Spain

Consolidate -c operator
![[106] 360 check font - check whether the copyright of local Fonts is commercially available](/img/a7/615e8000647b56f03a6a1d3dd81b6d.jpg)
[106] 360 check font - check whether the copyright of local Fonts is commercially available
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7](/img/41/e3ecbd49e4bfeab6c6e7d8733fe33a.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
随机推荐
Switch basic experiment
91.(cesium篇)cesium火箭發射模擬
【脑洞大开】《西潮》及《走向世界丛书》
ASTM D 3801 vertical burning test of solid plastics
微信模拟地理位置_伪装微信地理位置
使用BurpSuite对app抓包教程
微信小程序 – 80个实用的微信小程序项目实例
Ansible Playbook
Digital signal processing -- Design of linear phase (Ⅱ, Ⅳ) FIR filter (2)
[20220605] Literature Translation -- visualization in virtual reality: a systematic review
Friends day 2022
硬阈值(Hard Thresholding)函数解读[通俗易懂]
leetcode 406. Queue reconstruction by height
ASP. Net core 6 from entry to enterprise level practical development application technology summary
Chapter 14 signals (IV) - examples of multi process tasks
Joint Time-Frequency and Time Domain Learning for Speech Enhancement
Onenet Internet of things platform - create mqtts products and devices
[datawhale202206] pytorch recommendation system: multi task learning esmm & MMOE
Wechat applet reports an error: [rendering layer network layer error] pages/main/main Local resource pictures in wxss cannot be obtained through wxss. You can use network pictures, Base64, or < image/
[speech signal processing] 3 speech signal visualization -- prosody