This video features a conversation between a host and a student aspiring to break into quant trading. The student demonstrates an impressive depth of knowledge in computer science fundamentals, particularly in areas like CPU architecture, caching, and operating systems, which are crucial for high-frequency trading roles. The discussion covers interview strategies, technical concepts, and career advice for aspiring quant developers.
Here's a summary of the questions asked and the candidate's answers, in order:
Question: How much more latent is going to RAM compared to L1 cache? Answer: The candidate performed an experiment showing throughputs of 200 GB/s for L1, 150-100 GB/s for L2, and similar throughput but better latency for L3. While specific latency numbers weren't given, the experiment demonstrated the significant performance difference.
Question: Do you know about cache associativity? Answer: Yes. The candidate explained it as how many places a memory address can be associated with in the cache, mentioning k-way set associative caches and the trade-offs between associativity and search time.
Question: Do you know the difference between physical and virtual addresses? Answer: Yes. Virtual addresses are an abstraction managed by the OS over physical addresses. The OS uses a multi-level page walk to convert virtual to physical addresses, with the TLB caching these translations to speed up the process.
Question: What is a cache miss? Answer: A cache miss occurs when a requested memory address is not found in the cache, requiring a fetch from main memory (or further down the memory hierarchy).
Question: Do you know the three types of cache misses? Answer: The candidate recalled "compulsory miss" and "capacity miss" but struggled with the third. The host later confirmed them as compulsory, capacity, and conflict misses.
Question: How do modern architectures prevent TLB flushes when switching threads? Answer: The candidate suggested tagging TLB entries with a process ID and swapping out TLB entries. The host added that Address Space Identifiers (ASIDs) are used for this.
Question: What part of the CPU schedules jobs? Answer: The candidate identified the "scheduler," explaining that the CPU's front-end handles tasks like decoding and branch prediction, feeding micro-operations into a queue. The scheduler then takes operations from this queue and executes them on available execution ports.
Question: What are CPU job scheduling algorithms? Answer: The candidate mentioned "first come, first serve," "priority scheduling," and "round robin" (though noting the latter is more common in OS scheduling).
Question: What is cache affinity? Answer: The candidate hadn't heard the term but understood it in the context of CPU affinity, where pinning a process to a specific core helps maintain cache state for that process and avoid performance drops due to CPU migrations.
Question: How do you prevent jobs from jumping between CPUs?
Answer: The candidate mentioned using system calls to pin a process to a specific core and setting a high process priority (e.g., using the nice command with a low value like -20 on Linux) to discourage the OS from context switching it out.
Question: What is Linux Nice command? Answer: The candidate knew the value (-20 being the highest priority) but not the specific name of the metric being adjusted. The host confirmed it's called "nice."
Question: What is NUMA CPU architecture? Answer: The candidate explained NUMA (Non-Uniform Memory Access) as an architecture where different CPUs have varying degrees of access speed to memory. This contrasts with uniform memory access where all CPUs have equal access. They noted it's something they learned for an exam and haven't delved deeply into.
Question: On a scale of 1-10 (5 being average), how would you rate your C++ knowledge? Answer: A "three," stating Python is their primary language.
Question: How do you craft a quant-based resume coming from a web dev background? Answer: The candidate highlighted the need to emphasize relevant projects, as their work experience is primarily in web development. They suggested projects might need to be placed above work experience on the resume to showcase the necessary technical knowledge.
Question: How do you prevent being nervous in an interview? Answer: The host advised practicing by recording oneself to identify stuttering or awkward communication, and emphasized that experience and "seat time" (practice) are the best ways to overcome nerves, much like learning to ride a motorcycle.
Question: Are there any good mock interview services? Answer: The host believes they are worthwhile if the interviewer has relevant experience (like having been an interviewer for top firms). They stressed the importance of receiving raw, honest feedback.
Question: What are your thoughts on online coding assessments (like HackerRank)? Answer: The candidate mentioned having a previous instance where they didn't complete an OA due to lack of preparation, but they communicated this to the company after accepting another offer. The host noted that not dropping out of the process cleanly might affect reapplying.
Question: How important is communication at work? Answer: Extremely important. The host described the software engineering field as "the land of the blind," where effective communicators (the "one-eyed") have a significant advantage. They also noted that communication styles need to be adaptable to different colleagues and organizational cultures.