Bloomberg LP Interview Question for Software Engineer / Developers


Team: Price history
Country: United States
Interview Type: In-Person




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

The physical pages associated with shared libraries and the text segment are mapped into the virtual address space of both processes. Pages that are copy-on-write, until modified. Plus, any explicitly shared memory segments as well - mmap().

- yeah... September 30, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Let us first understand the structure of a process. A process contains text section which contains the program code, a data section that contains global variables, Heap ,which is memory that is dynamically allocated during process runtime and a process stack which contains temporary data like function parameters ,return addressand local variables.

Now although two process may be associated with the same program they are always two separate execution. Text sections(program code) will be same but data,heap,stack section may vary.

- Ayush July 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

No memory will be shared even if we run the same program twice. process and programs are different. whenever a process completes, the cpu will release its resources (includes memory) and remove another process from queue which might get the memory of the previous process. it depends on policy of cpu(e.g. LRU etc). i am not sure what you mean by text portion of memory

- ayush August 12, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

There are different memory segments when program is loaded in memory. The includes data segment, code segment, etc. The code segment contains actual instructions that will be executed. So I think, in this question, Text portion is code segment.

- AP April 30, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

the code and/or data might be cached and also the machine instructions

- ayush August 12, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Machine instruction for sure.

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

The text segment contains machine instructions and is read-only and shared by concurrent instances of the same process. The physical memory would not be shared (re-used?) if a process starts up and then closes down since the original physical memory could be reallocated to any task between the first process shutting down and the second starting up.

- shauno August 16, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i think what the questioner meant is what happens if there is no other program between the two runs

- shy guy September 14, 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