Amazon Interview Question for Software Engineer / Developers






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

atomic instruction + memory fence instructions

- sam September 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can we use wait , notify concept here ?
Like if one thread is using a specific object we will send other threads in wait state and once done we will notify all the threads that this resource/object is now open to use !

- Anonymous September 08, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

> with out using Synchronized method , synchronize block or volatile keyword

Short of rooting around in java.util.concurrent, it's impossible to do mutual exclusion portably in Java. (In before Peterson's algorithm etc.; Java implementations are not required to be sequentially consistent.)

- Anonymous September 05, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

(Also in before wait(), notify(), or notifyAll(); those require a synchronized block.)

- Anonymous September 05, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use external locks in Java 1.5 that allows you to check if the lock is acquired before acquiring it.

- KM September 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Can we apply producer-consumer problem for this question?

- Anonymous September 09, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

use locks

- Anonymous September 05, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

how to synchronize then??????

- vini September 08, 2011 | Flag


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