Intel Interview Question for Software Engineer / Developers


Team: 3D graphics
Country: United States
Interview Type: Phone Interview




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

To answer the question we need to know about Copy On Write(COW) concept.
It means create a copy of the shared variable when the state of the variable changed by a process.
In the above concept File descriptors are shared variables.Those variables represents the files. For file we have 2 types f state changes.
1) open
2) close
If child closes the file descriptor then the state of the file going to changed.So it will create a copy for the file descriptor and it will close the copy.

If the child starts writing into the file COW it wont accrue.because the state of the file is note changed.So it can write into the file.

- srinivas April 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

copy on write is used while exec, not during fork..

- ii April 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

when a process call close function to close a particular open file through file descriptor.The file table of process decrement the reference count by one.But since parent and child both are holding the same file(there refrence count is 2 and after close it reduces to 1)since it is not zero so process still continue to use file without any problem.

See Terrence Chan UNIX system programming,(Unix kernel support for Files).

- madan.ram.code.1 September 17, 2013 | 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