MS/Ph.D. interviews on Computer Systems and the Sorry State of Computer Systems Education in India
Disclaimer: Before I use a letter (word), a disclaimer. This blog is written as an individual with personal opinions, and the views expressed here do not reflect the views of my employer (organization) that I belong to. Let’s jump into the MS/Ph.D. interviews (happens just after the GATE exam) on Computer Systems at the IIXs and the sorry state :(.
In general, for the uninitiated, computer systems deal with the study of mechanisms that make a computer work. In general, keywords like compilers, computer architecture, operating systems, computer networks, and some or all combinations of the above keywords constitute “computer systems.”
Let’s put a fictional character into this blog, Gollu, who has applied for MS/Ph.D. in CS at the IIXs in India. Let’s have another character named Pollu, a Professor working on Computer Systems at one of the IIXs.
And the interview begins:
Pollu: What is the use of Virtual memory?
Gollu: Limited Physical memory, processes demand more, creates an illusion, etc.
Pollu: Do we need virtual memory if we have infinite physical memory as modern-day physical memory size is more than sufficient?
Gollu: No, then there is no need. :(
Pollu: What will be the maximum size of virtual memory supported on modern systems?
Gollu: Size of the hard disk :(
Pollu: What is a thread and how is it different from a process?
Gollu: “thread is a lightweight process.”
Pollu: What is lightweight?
Gollu: ehh, hmmmmm :(
Pollu: What will happen if we do not maintain stack and registers per thread and instead make these global resources that can be accessed by all the threads?
Gollu: We can do that but …….:(
Pollu: Is the page table a software or hardware data structure? Which entity in the computing stack populates the page table? Is the page table walker a software state machine or a hardware state machine? How does the CPU know the address of the page table as the page table is stored in memory and the CPU generates a virtual address?
Gollu: software, hardware, OS, CPU, ……. instructions .. :(
Pollu: What address (virtual/physical) does a printf statement to an address of variable generate?
Gollu: Physical as it is translated by virtual memory :(
Pollu: What metric will you use to determine the optimal number of cache levels in a cache hierarchy?
Gollu: Hit rate, Miss rate, Hit time, Miss time, ……. :(
Pollu: In general, if we have a 2GB SRAM cache and a 2GB DRAM as physical memory, which one will be slower to access and why?
Gollu: Cache will be slower, DRAM can be slower, both can be slow, it depends. Static is slower than dynamic. :(
Pollu: Is Linux OS secure? If yes, why?
Gollu: It is secure if the latest version is installed; else non-secure. :(
Pollu: How to make the Linux OS secure?
Gollu: Strong password may be :(
Pollu: Why are SRAM caches preferred over DRAM?
Gollu: SRAM caches are faster
Pollu: So why cannot we use GBs of SRAM caches?
Gollu: It will be expensive
Pollu: What if we have all the money in the world?
Gollu: hmmmmm. Ehhhhh :(
Pollu: What compiler do you use for compiling C/C++ programs?
Gollu: Online compiler :(
The list of questions goes on and on. With all the information available at the fingertips, it is sad to see this “sorry state.” Having said that, there were also a few candidates who were just incredible in terms of the basics of Computer systems and skills required for computer systems research.
Going ahead, what can Gollu do to better understand computer systems concepts? Nah, I will not provide answers else this blog will be like a quora message answering a few questions. Instead, I will provide my two cents, which are as follows:
i) Gollu should read standard textbooks like three easy steps on OS, Computer Architecture by H&P, and dragon book on compilers.
ii) If Gollu does not like reading fat textbooks, Gollu can go through the lecture videos from professors/researchers doing research on these subjects.
iii)If Gollu does not like watching videos, he/she can just ask simple questions like why and how about everything. For example, Gollu encountered the buzzword “virtual memory.” “What is virtual memory”; not a big deal as it is easily accessible? Why virtual memory? What if we do not have virtual memory? Why is virtual memory as a mechanism implemented the way it is implemented? Why should the OS be involved here? How do CPU and OS interact to provide this illusion of ample memory space? What else does virtual memory provide? Any downside to virtual memory? Post your queries at the right forums in case you struggle.
iv) Gollu usually goes to “gyanisforgyanis” (a hypothetical forum for example) for the answers. However, the responses that Gollu finds at these gyani forums are also in a sorry state and the gyanis just provide what is needed to clear a gate called the GATE exam. Instead, forums like Quora and stack overflow provide a much better discussion platform where folks think, tinker, and ask the right set of questions to the responses. So choose your forum wisely and surf the internet wisely.
v) Code, run experiments, see for yourself on real systems, or use tools to see what happens if we do XYZ this way and not that way?
Hope the above steps will be helpful to Gollu in bringing the curiosity to find out answers to these simple and yet subtle questions by questioning deep or by playing with the real systems. So start asking questions as questions are more important than remembering answers. I am sure you will love computer systems once you understand their intricacies. I guess Gollu is excited to find the answers and, most importantly to ask many more questions (both known and unknown) that this blog does not talk about.