Label archiving: linux

Linux IO multiplexing analysis (Select, Poll and Epoll)

Some time ago, I was forced to replace the Select mechanism in a bunch of code that no one maintained with Epoll. I take this opportunity to sort out the principles of Select, Poll and Epoll.

I/O multiplexing:

I/O multiplexing can monitor multiple descriptors through a mechanism. Once a descriptor is ready (generally read ready or write ready), it can notify the program to perform corresponding read and write operations. However, select, poll, and epoll are all synchronous I/Os in essence, because they are all responsible for reading and writing after the read-write event is ready, that is, the process of reading and writing is blocked, while asynchronous I/O is not responsible for reading and writing. The implementation of asynchronous I/O is responsible for copying data from the kernel to the user space.

Read on

Winter vacation

It should be said that winter vacation has lasted for several days.

January 14 is supposed to be winter vacation after the exam, but for some reason, I didn't go home immediately.

16. 17 、 18 I went out with my cousin, climbed the Badaling Great Wall at - 16 ℃, and experienced what it means to freeze mineral water.

The 20th finally came back.

Then I learned that I had to stay at home to get warm in the coldest winter in history, plus my cough was still not good. Read on