▸case-01 Write a C code snippet initializing an epoll event descriptor for a non-blocking TCP socket descriptor `fd` using edge-triggered notification mode to monitor incoming connection events. Developers often default to level-triggered `EPOLLIN`, but we specifically need edge-triggered registration. | pass→pass | 6,284 | 16,868 | +168% | 1 | 1 | 0% | 1,280 | 2,211 | +73% | 0 | 0 | — |
▸case-02 When processing read notifications in an epoll loop configured with `EPOLLET`, developers frequently issue a single `accept()` or `read()` call and return to `epoll_wait`. Write C code for the event handler accepting incoming connections from socket `fd` until drained, and specify the loop exit condition. | pass→pass | 11,871 | 11,653 | -2% | 1 | 1 | 0% | 2,436 | 3,092 | +27% | 0 | 0 | — |
▸case-03 While POSIX `aio_read` was historically used for async I/O, modern Linux high-performance networking uses kernel ring buffers. Write C code using the liburing helper API to initialize an io_uring queue with space for 256 entries. | pass→pass | 5,591 | 5,520 | -1% | 1 | 1 | 0% | 1,208 | 1,779 | +47% | 0 | 0 | — |
▸case-04 A developer runs `strace ./server` to diagnose an event loop performance bottleneck, but the command prints millions of raw syscall lines to stderr and slows down execution. Provide the strace command flags to trace thread children and output an aggregated syscall time summary histogram instead. | pass→pass | 7,960 | 9,992 | +26% | 1 | 1 | 0% | 1,384 | 2,030 | +47% | 0 | 0 | — |
▸case-05 Running `perf record ./server` captures sample counts, but `perf report` cannot show function call trees or callback call stacks. What specific flag must be added to `perf record` to record stack trace frames for `./server`? | pass→pass | 5,283 | 4,849 | -8% | 1 | 1 | 0% | 982 | 1,497 | +52% | 0 | 0 | — |
▸case-06 By default, running `perf report` opens an interactive curses TUI in the terminal, which fails inside automated CI pipeline scripts. Provide the command flag for `perf report` that formats the profile analysis into standard text output. | pass→pass | 3,410 | 2,634 | -23% | 1 | 1 | 0% | 507 | 985 | +94% | 0 | 0 | — |
▸case-07 When porting a C network server from Linux to macOS, developers cannot use `epoll_create1`. Write a C code snippet initializing the native BSD kernel event queue and registering a read filter on socket `fd`. | pass→pass | 8,130 | 7,221 | -11% | 1 | 1 | 0% | 1,701 | 2,066 | +21% | 0 | 0 | — |
▸case-08 Developers writing C++ Windows networking servers sometimes incorrectly attempt to use POSIX `select()` for high-throughput I/O. Write C/C++ code to set up a Windows I/O Completion Port and retrieve completed I/O notifications in a worker thread. | pass→pass | 19,923 | 18,055 | -9% | 1 | 1 | 0% | 4,237 | 4,532 | +7% | 0 | 0 | — |
▸case-09 Many async event loops maintain scheduled connection timeouts in a sorted min-heap, but min-heap insertions scale at O(log N) time, which degrades under millions of active timers. Explain how a hierarchical timer wheel achieves superior insertion performance and state its Big-O complexity. | pass→pass | 17,021 | 16,078 | -6% | 1 | 1 | 0% | 3,036 | 3,568 | +18% | 0 | 0 | — |
▸case-10 An event loop handling a flood of network socket read events never executes scheduled timers or write callbacks because it reads pending sockets indefinitely in every tick. Describe the design pattern used in production event loops to avoid callback starvation. | pass→pass | 16,495 | 16,597 | +1% | 1 | 1 | 0% | 2,599 | 3,493 | +34% | 0 | 0 | — |
▸case-11 For a cross-platform C application needing non-blocking I/O across Windows, Linux, and macOS without writing custom `epoll`/`kqueue`/`IOCP` wrappers, what C event loop library (used internally by Node.js) should be selected? Write a C snippet initializing its default loop. | pass→pass | 4,866 | 6,865 | +41% | 1 | 1 | 0% | 941 | 1,569 | +67% | 0 | 0 | — |
▸case-12 A Rust developer wants to build a custom async networking engine. They need a lightweight crate that provides non-blocking, readiness-based I/O primitives directly wrapping OS epoll/kqueue/IOCP without the overhead of a full task executor or reactor runtime. Which Rust crate should they select? | pass→pass | 7,632 | 12,150 | +59% | 1 | 1 | 0% | 1,064 | 2,339 | +120% | 0 | 0 | — |
▸case-13 Rather than manually managing OS thread pools or raw mio selectors, a Rust developer wants to build an async network microservice using the industry-standard high-level async runtime crate. Write a Rust code snippet showing the attribute macro and function signature required for the async entry point. | pass→pass | 4,439 | 3,892 | -12% | 1 | 1 | 0% | 776 | 1,321 | +70% | 0 | 0 | — |
▸case-14 A C++ engineer building an enterprise network daemon wants to avoid writing raw C epoll loops. Show how to initialize the core event context and start the event execution loop using Boost's async I/O framework. | pass→pass | 13,616 | 12,619 | -7% | 1 | 1 | 0% | 2,709 | 3,109 | +15% | 0 | 0 | — |
▸case-15 A classic C TCP server creates one thread per client socket (`pthread_create`). At 10,000 active connections, the system crashes due to thread stack memory exhaustion and 'Too many open files' OS errors. Explain the two fundamental architectural and OS changes required to achieve C10K+ scaling. | pass→pass | 14,381 | 16,016 | +11% | 1 | 1 | 0% | 2,591 | 3,664 | +41% | 0 | 0 | — |
▸case-16 If a socket descriptor registered in an epoll loop remains in default blocking mode, an unexpected missing payload will block the entire event loop thread on `recv()`. Write a C function using `fcntl` to inspect current socket flags and add non-blocking behavior. | pass→pass | 9,164 | 11,530 | +26% | 1 | 1 | 0% | 1,877 | 2,420 | +29% | 0 | 0 | — |
▸case-17 When writing data to a TCP socket in an async event loop, `send()` returns `-1` with `errno` set to `EAGAIN`. Naive implementations drop the data or busy-wait in a tight loop. How should an event loop properly handle backpressure for this socket? | pass→pass | 17,093 | 19,168 | +12% | 1 | 1 | 0% | 3,329 | 4,350 | +31% | 0 | 0 | — |
▸case-18 When 16 worker processes in a multi-process web server all listen on a shared listening TCP socket, an incoming TCP connection causes the kernel to wake up all 16 processes, though only one accepts it. What is this phenomenon called, and what Linux socket option resolves it? | fail→pass | 4,981 | 7,809 | +57% | 1 | 1 | 0% | 896 | 2,025 | +126% | 0 | 0 | — |
▸case-19 A Node.js or Python async server exhibits high request latency, but system CPU meters (`top`) report only 20% CPU usage. How can an application programmatically measure event loop delay (lag) to detect blocking synchronous code? | pass→pass | 16,418 | 14,358 | -13% | 1 | 1 | 0% | 3,103 | 3,323 | +7% | 0 | 0 | — |
▸case-20 Executing complex application logic directly inside asynchronous POSIX signal handlers (`sigaction`) causes deadlocks and race conditions. Write C code demonstrating how Linux allows signal events (`SIGINT`/`SIGTERM`) to be converted into file descriptors and integrated directly into an `epoll` loop. | pass→pass | 15,561 | 15,126 | -3% | 1 | 1 | 0% | 3,423 | 3,699 | +8% | 0 | 0 | — |
▸case-21 A developer converting a TCP epoll loop to handle UDP datagrams assumes `recv()` will return stream chunks that need frame reassembly across loop iterations. Explain how UDP packet boundary semantics differ from TCP stream reads when handling socket readiness events. | pass→pass | 14,628 | 17,329 | +18% | 1 | 1 | 0% | 2,530 | 3,609 | +43% | 0 | 0 | — |
▸case-22 Developers familiar with `epoll` often assume `io_uring` works by polling sockets for read/write readiness. Describe the ring buffer structure of `io_uring` and explain how its completion-based paradigm differs from readiness-based polling. | pass→pass | 19,759 | 19,761 | +0% | 1 | 1 | 0% | 3,522 | 3,986 | +13% | 0 | 0 | — |
▸case-23 A developer is choosing between Level-Triggered (LT) and Edge-Triggered (ET) modes for `epoll`. Explain the functional difference in how `epoll_wait` triggers events in each mode and what happens in ET mode if unread data remains in the kernel socket buffer. | pass→pass | 13,785 | 12,696 | -8% | 1 | 1 | 0% | 2,520 | 2,867 | +14% | 0 | 0 | — |
▸case-24 We are building a legacy enterprise C socket server that MUST use a traditional thread-per-connection concurrency model where each incoming TCP connection is handled synchronously by its own dedicated POSIX thread blocking on `recv()`. Do not use non-blocking multiplexing or async event loops. Write the C connection handler setup code. | pass→pass | 21,011 | 17,889 | -15% | 1 | 1 | 0% | 3,611 | 4,640 | +28% | 0 | 0 | — |
▸case-25 We need to build a Unix multi-process daemon server using the classic prefork architecture (similar to classic Apache or Gunicorn prefork) where a master process forks child worker processes using `fork()`, and each child process synchronously blocks on `accept()` on the shared socket. Write the C code for child worker process creation and process signal cleanup without using event loop multiplexers. | fail→fail | 26,338 | 32,372 | +23% | 1 | 1 | 0% | 5,456 | 6,049 | +11% | 0 | 0 | — |
▸case-26 In a synchronous blocking TCP client application (not using any event loop or non-blocking calls), how do you configure the socket using standard POSIX system calls so that a blocking `recv()` call times out after 5 seconds instead of blocking indefinitely? | pass→pass | 8,214 | 8,102 | -1% | 1 | 1 | 0% | 1,748 | 2,217 | +27% | 0 | 0 | — |