Aricent Interview Question for Applications Developers


Country: India




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

Critical section is a segment of code which can be executed by one process at a time and other processes should wait at that time. Example is writing database or file, which are read by other processes or using a shared resourse.

MUTEX is a variable used as a token to execute the critical section.

- nav July 13, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In concurrent programming, a critical section is a piece of code that accesses a shared resource (data structure or device) that must not be concurrently accessed by more than one thread of execution. A critical section will usually terminate in fixed time, and a thread, task, or process will have to wait for a fixed time to enter it (aka bounded waiting). Some synchronization mechanism is required at the entry and exit of the critical section to ensure exclusive use, for example a semaphore.

mutex is short for mutual exclusion object. In computer programming, a mutex is a program object that allows multiple program threads to share the same resource, such as file access, but not simultaneously. When a program is started, a mutex is created with a unique name. After this stage, any thread that needs the resource must lock the mutex from other threads while it is using the resource. The mutex is set to unlock when the data is no longer needed or the routine is finished.

Yes, threads within the same process or within other processes can share mutexes.

- neerajlakhotia08 July 14, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Critical Section (at a given time one instance should process): Synchronize a piece of code or activities with in process or across processes in single application or multiple application.

Mutex(lock) : Locking mechanism which provides locks , this is used only when synchronization happens across processes in single application or multiple application, not within the current process. In Multiple application you need to have db for tracking.

- Karthik Houston November 09, 2014 | 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