Log In
My interview was initially scheduled for July 22, on July 21(my birthday too xD) in the morning I saw a missed call, and I called back and it was hod of CSE department and he was like we’ll conduct your interview today itself. He called 3-4 times, kept on postponing the time of interview, and finally, in the evening he was like well do your interview tomorrow(I was like gg, day wasted and I started playing csgo immediately xD). On July 22 in the morning at 8:45 he called and asked me to join the interview.

Subject chosen – COA

There were 6 people including the hod and he was like we’ll ask you programming first and then COA, I was like cool.(I am just an average guy in programming with less experience)

hod – Hello Nikhil tell about yourself

Me – Uhm .. my name is Nikhil, computer is my first love , my aim since I was 6 years old was to learn computer in such a way that I have to be able to build a computer from scratch (i.e) I want to learn A-Z of a computer. I come from a shitty undergrad college where I wasn't able to learn any computer science, but then I joined gate coaching in my 4-2 where the faculty was really nice and I was able to learn real computer science.

hod was smiling and asked me where did I attend my gate coaching and which city I live in.

Me – Hyderabad and ace academy sir.

Then my programming interview began.

Interviewer 1 - Given a sorted linked list, write a function that finds the correct place for the given value and places it there.

Me – In my mind I was so happy because I felt that it was an easy question, and wrote the code in a stretch, I missed a corner case which I immediately recognized and was about to write additional code for that he was like cool leave it.

Interviewer 1 – Now he was like write another function which takes an array as input and returns a sorted linked list which has the elements of that array, has to use insertion sort and also use the previously written function.

Me – Again I was happy because I kind of can write the basic sorting algorithms fine. So I started writing the code and did a small mistake which I corrected in a minute when they pointed it out and finally I wrote the code fine(which I wasn't expecting xD).

Interviewer 1 was like I’m done

Interviewer 2 – I’ll ask you questions from COA, but first open your program and then he was like you used a lot of pointers in it, can you tell me which addressing mode is used in your code.

Me – In array we use indexed addressing mode and was explaining how it works then Interviewer 2 got disconnected from the call.

hod – It seems like Interviewer 2 has a technical problem, in the meanwhile I’ll ask you something

Me – sure sir

hod – “ Let me guess, your father has done PhD in IISC Bangalore?”

Me – I was like what?? inside my head laughed a little and told him no sir he used to work in a bank and is retired now, but I want to do PhD definitely after my masters.

(well maybe because of the way I look, I kind of had a beard, long hair, and spectacles)

hod – “hahaha fine I was just asking”

Interviewer 2 came back and started asking me to explain all the types of addressing modes

 I did explain all types

In2 – Do you know how many different levels of cache are present?

Me – 2-3

In2 – why do we need 2-3?

Me – told him that smaller the cache faster the speed usually, as searching in bigger search space could be slower than searching in smaller search space and explained a bit more.

In2 – How do we search for a byte in let’s say L3 cache?

Me – Uhm.. I’ll come from the virtual address generated by the CPU, address is a string of bits, well use the bits which are assigned for cache block number as select lines in the Nx1 MUX where N is the number of cache blocks and the selected blocks tag bits are sent to a comparator and compared with the tag bits in the address.

In2 – Ok can you tell me roughly the sizes of each level

Me – l1 – 32 KB maybe, l2- 256 KB l3-2MB

In2 – Now why do you say searching in L3 is slower than searching in L1 when same MUX and comparator are used?

Me – I was like uhm ok to win the argument I could say that 256 x 1 MUX is faster 1024 x 1 MUX

In2 – he smiled and was like no that isn’t the reason anyways tell me different types of cache.

Me – You mean like TLB, etc?

In2 – No I mean direct mapped etc..

Me – Oh cool, yes sir basically there are 3 types direct mapped, fully associative and set associative.

In2 – Explain about fully associative

Me – Anything can be anywhere (he smiled), I continued and was like any main memory block can be present in any cache block and the tag bits are everything except the byte offset in the address.

In2 – suppose in a 4 way set associative mapping in set-0 block 0 is present, can any other block come into that set?

Me – I said yes sir any main memory block which is multiple of 4

In2 was like 4? then I immediately responded

Me – sorry sir, I assumed that the number of cache sets is also 4, lets say that number of cache sets is S, then any block which is multiple of S can be present in set – 0.

In2 – now let's say there are 2 blocks in set – 0, already one block is filled now when a new block comes what happens?

Me – as another block in the set is empty it goes there

In2 – Now another block came in then?

Me – It depends on which cache replacement policy you use, could be LRU or FCFS etc..

In2 – ok can you tell me different cache misses in different types of cache?

Me – You mean like misses analysis in different mappings?

In2 – yeah exactly

Me – In direct mapped cache conflict misses are the highest as the number of main memory blocks contending for a single cache block is the highest here, in set-associative it is less than direct mapping and in fully associative it is the least. Compulsory misses are the same everywhere and these are the only misses I could think off.

In2 – Yeah that's fine(was satisfied with my answer and was like I’m done)

hod – Ok Nikhil your interview is done, do you have any questions?

Me – Sir, if someone accepts an offer in coap and got selected for MS in madras is there any mechanism which detects that?

hod – what is coap?(I was like what??? in my head. I guess we both misheard each other here xD) mtech seats are independent of MS seats.

Me – ok cool ignore my question.

PS – This was one of the best interviews I had so far, and I really like the people from IIT madras as they asked days before in which subjects I’d liked to be interviewed.

I even attended for IIT Gandhinagar interview where the interviewer was like tell me your favourite subjects

Me – COA and OS sir

Interviewer – Okay I’ll ask graph theory. (yup he did that and my interview didn’t go that well.)

My gate score is 776 rank 335 cat – general.
posted Jul 22 in Interview Experience 332 views