Directi | DevOps (Operations Engineer) | Unknown

Date: 2018

Written Test - Paper Pen – 30 min, 20 ques

From topics like Aptitude (easy questions like sum of all 3 digit nos. formed from 7,8,9), Networking basics (commands, permissions, etc.), OSI Model, Layers, Networking hardware like switch vs router and OS questions like caching technique’s tolerance to power failure. A couple of questions were from DBMS (Normal forms).

No need to prepare specifically for DOT Test. No speed required. Just accuracy.

Coding Round – 2 hrs

2 problems on a local server. No internet access.

1st problem was very easy. Reading characters from stdin (piped to the executable) and displaying stats like total amt read in bytes so far, speed of reading and showing a textual progress bar like [======= ] 60%. The simple trick was to use escape sequence, so you don’t have to print the progress in a new line on each update.

2nd problem was to output all palindrome nos. in the input, which consists of alphanumeric words delimited by space and newline. Had to be done in bash. I used grep and regular expressions and nailed it completely in 5 lines. Some corner cases weren’t handled, but the company personnel evaluating were completely blown away by the elegance of the solution.

First Round – Face 2 Face Interview (around 90 min)

A couple of cool guys took my interview. They started off by looking at my resume. I had done a project using Java/MySQL, which was a platform similar to OLX. He asked to tell me what the app does, what features and what technologies. Having heard databases, he proceeded to ask me how scalable the system is. What would I do, if the size of the database >> the size of my hard disk. I told him about distributed databases; given a username, I will hash it and associate

the IP of the corresponding database bucket with hashes, and then forward SQL query to that particular machine. That machine will have only those tuples of all tables, which have the same username hash as the input. How would I deal with the situation, where the physical machine having one of the DB buckets fails. Explained about introducing redundancy and fault tolerance. We can associate a set of IPs with a particular hash value, and all those IPs have the same data so if one fails the others can be queried. We could also use some form of round robin Load Balancing to relieve a particular machine of excessive load.

Asks me about the bash script in Coding round. Impressed by the elegance of my solution.

Then he saw achievements. I had mentioned that I won the 2nd prize in Revengg (Avishkar reverse engineering event). So he asked me what I reverse engineered. Told him about finding hardcoded strings in programs, answering questions given only the executable and not the source code. Asked how you did those tasks; told about objdump, strace (system call tracer), ltrace (library call tracer) – google these to know about them. Asked where a hardcoded string is stored. Told about read only section in data segment. Seemed satisfied.

Asks me to rate myself in OS, Networking, DB, Linux, Shell scripting.

After that he asked me what happens when you type in Google.com in your browser. Detailed discussion on DNS. He confused me between iterative and recursive queries and face palmed when I gave incorrect answer :/

Asked where DNS caches are stored. Told resolving name server, possibly at the browser level, and also about hosts configuration file which may contain mappings (check out that file, google this). Impressed when I mention hosts file.

Asked how Google knows that it has to give the Indian version google.in. Couldn’t tell. So he told me about AnyCast, which I hadn’t heard.

Then I just proceeded to explain the usual stuff like HTTP request, then response then browser rendering. Also told him about how the packet will traverse the internet, default gateways, MACs and all that.

Then he asked me how my college internet works. Discussion on private/public IP addresses ensued. Then he asked about NAT and PAT concepts. Asked to draw the NAT table. Told him the version I was taught in class (local IP, local Port, Dest. IP, Dest. Port). Then he pointed out a flaw in my table that another column was missing. Gave a lot of hints at what it could be. The flaw was a collision – what if 2 people request Google webpage, then how will you translate the dest. IP, dest port pair back to local, because both of them would be same for both people. The answer, he told later, was another port which I missed – that port, which is associated with the TCP connection which the NAT box establishes with Google. That would differentiate b/w 2 people requesting same website.

Proceeded to Linux. Asked about hardlinks vs softlinks. Talks about inodes. Asked whether inodes are unique across file systems, and which of symlink / hardlink would exist across file systems (ans=symlink because it is associated with the filename instead of inodes, like windows shortcuts). I gave a decent explanation, which he refined.

Asked what happens when you type ls command. Told him that the shell will look into locations specified by PATH environment variable (Check out “echo $PATH” on your terminal). Told that the ls binary (executable) is stored in /usr/bin directory. Impressed.

Then he asked me some cool questions. What will you do, if you change the permissions of chmod binary to rw-rw-rw-. Now you can’t modify the permissions because u can’t execute the chmod file! Suggested replacing the defective binary with a fresh binary from another system. He told the answer was to write your own chmod, or reinstall w/ package manager. Moderately impressed because reinstall w/ package manager was equivalent to my answer.

Asked me what’s your primary OS; I told Windows and Fedora 21 on VMware. Asked about the lot of issues I faced when I installed Linux (overheating and all). Told how I fixed the ASPM (active state power management) issue due to graphics card drivers. What he suggested was precisely what I had done to solve the problem – turn off the external ATI graphics adapter using a script at boot time.

Asks why virtual memory is used. I told the bookish answer, he isn’t satisfied, says give more reasons. What he wanted to hear was something related to process isolation and protection.

Deadlock basics asked. Brief discussion of how I will handle deadlocks.

Then the interview was done. Lasted for 1.5 hrs.

Second Tech interview – Telephone (around 50-60 min) – STRESS TEST

Interview was to be held on Skype, but was conducted on Phone because of connectivity issues of TPO Wi-Fi. Telephonic interviews are somewhat difficult. He asked me to talk in Hindi.

Looks at my CV. Sees Java, so asks what JVM is. Told him that it’s a virtual machine that runs java programs. Asks what a virtual machine is. Told that it’s an entity which runs code within itself.

Started off with what you want to do, future plans. I was nervous so spontaneously said some nonsense. He was really pissed with me because of the nonsense. Asked me whether I had any experience with machine learning, Lucene, Python etc. Told me that in practical life only the implementation skills matter; all the theoretical knowledge is for nothing.

Asks me about the bash script in Coding round. Impressed by my solution.

You have a file that contains column-wise arranged data of source IP/destination IP and few other values. You have to tell what the most frequent IPs are. Now I answered that I will use awk scripting. It extracts each row and performs some action for each row. Asked what DS I will use. Told him that a heap would be appropriate. Asked some more DSs for this prob. couldn’t tell any more.

Asks what the difference between a thread and a process is. Moves on to inter process communication – told about shared memory & message passing. Says how will handle such cases when both process are accessing the msg queue at the same time. Told concurrency control. Brief discussion on semaphores.

Asks why virtual memory. Discusses virtual memory and swapping. Discussions on CPU scheduling algos – pre-emptive and non-pre-emptive.

Talks about load balancing. Asks whether I know data warehousing. I said I don’t.

Asks about ARP.

Asks me about the profile. I told him this is a system admin sort of profile. Then he explains this is very different from that. Explains the responsibilities. Says this is a very unique profile, which includes knowing every technology, even some coding aspects.

Then he gives me a bottom-line of the interview. Says he wants to reject me because of my attitude, but “I am passing you to the next round, just because you’re smart”.

I was really intimidated by this interviewer. I thought he would give me a FAIL, but then I got a call on my way back to hostel for another Tech round.

Third Tech round – Telephone (around 30 min)

Supposed to happen on skype, but happens on phone for the same reason as discussed above.

Really chill interviewer. Asks about the OS concepts, semaphore virtual memory, etc.

Asked question about DMA (Direct Memory Access) which I couldn’t tell. Interrupts, what are they, ISR etc. asked. Asks what indexing and reverse indexing in DB is. Asks about Linux file system, some weird thing I didn’t know

Spends most of the time telling about the profile, and answering my ques.

No HR type stupid questions asked.

Important concepts

OS – concurrency control (semaphore, mutex), virtual memory, IPC

N/W – Basics (OSI model, IP addressing), Load balancing, hardware aspect (switch routers etc), DNS, HTTP, networking commands like netstat/nmap

DBMS – Normal forms, index, DB security, DB performance, basic SQL knowledge, NoSQL basics, scalability in DB

Linux – permissions, file system structure, frequently asked tricky questions, core commands like grep, ls

DS/Algo – geeksforgeeks

Comments (1)