Google Interview Question for SDE1s


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

In addition to other answers use elevator disk scheduling algorithm.

- smm March 03, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Elevator algorithm (SCAN) or circular elevator algorithm (C-SCAN).

- Alex M. April 23, 2016 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) A request is a memory address (ram) , number of bytes to copy to , and hd address.
2) all requests are queued on the harddisk controller, which continuously rearrange the queue based on the hard disk current state and lowest seek distance.
3) process the requests on queue , and asynchronouly the DMA(Direct memory addressing) will copy the n bytes to the ram.
4)An interrupt could possibly be raised , with the request number. so the process that is waiting on this is revived.

- Anonymous December 15, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) A request is a memory address (ram) , number of bytes to copy to , and hd address.
2) all requests are queued on the harddisk controller, which continuously rearrange the queue based on the hard disk current state and lowest seek distance.
3) process the requests on queue , and asynchronouly the DMA(Direct memory addressing) will copy the n bytes to the ram.
4)An interrupt could possibly be raised , with the request number. so the process that is waiting on this is revived.

- Anonymous December 15, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Probably a bit late on this question...but I thought I would take a shot at it.

There are a couple ways to reduce read latency.
+ On sequential reads, read ahead can reduce latency.
+ Parallelizing the read i.e. reading from multiple disks like in a raid group can reduce latency.
+ Caching blocks can improve latency as well if the hit rate is good.
+ For random reads, readahead will not help and neither will caching. So, using a disk with good random read performance like ssds or sas disks can help as well.

For reducing write latency, there are a couple options as well.
+ Write to persistent memory for lazy writes to disk at a later time
+ Parallelize the writes i.e. divide the writes to multiple disks
..

- smallchallenges March 01, 2016 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More