I've heard that list of questions before. They sound very old.
Some of the answers are out of date. It's been decades since "stat" actually returned the contents of the inode structure on disk. There are lots of different file systems now, with different internal data structures. "stat" gives you a standardized result regardless of what's physically stored. Does ZFS even have "inodes"?
TCP packets don't have "types". They have 9 bit flags.
SYN, FIN, ACK, and RST are the important ones. There are others, PSH and URG (obsolete) and NS, CWR, and ECE (congestion notification that never really caught on). That field is not an enum.
Quicksort does not have the best "big O". There are pathological cases for Quicksort. There are binning algorithms that can beat O(n log n), going back to SyncSort from the 1960s.
Bit counting by table lookup went out years ago. If you make the table big enough to be useful, you cause cache misses. There's a population count instruction in CPUs with SSE4, which by now is almost all x86 machines in active use.
MAC addresses are traditionally 48 bits, but the IEEE is pushing EUI-64, which expands them to 64 bits. Traditionally they were 24 bits of vendor ID, 24 bits of serial number. Address space problems. They also were once fixed in the hardware, but now big shops change them dynamically to make cloud routing ("software defined networking") work.
Some of the answers are out of date. It's been decades since "stat" actually returned the contents of the inode structure on disk. There are lots of different file systems now, with different internal data structures. "stat" gives you a standardized result regardless of what's physically stored. Does ZFS even have "inodes"?
TCP packets don't have "types". They have 9 bit flags. SYN, FIN, ACK, and RST are the important ones. There are others, PSH and URG (obsolete) and NS, CWR, and ECE (congestion notification that never really caught on). That field is not an enum.
Quicksort does not have the best "big O". There are pathological cases for Quicksort. There are binning algorithms that can beat O(n log n), going back to SyncSort from the 1960s.
Bit counting by table lookup went out years ago. If you make the table big enough to be useful, you cause cache misses. There's a population count instruction in CPUs with SSE4, which by now is almost all x86 machines in active use.
MAC addresses are traditionally 48 bits, but the IEEE is pushing EUI-64, which expands them to 64 bits. Traditionally they were 24 bits of vendor ID, 24 bits of serial number. Address space problems. They also were once fixed in the hardware, but now big shops change them dynamically to make cloud routing ("software defined networking") work.
Somebody has an answer sheet from about 2000.