Goldman Sachs Interview Question for Software Engineer / Developers


Team: Strategies Group
Country: India
Interview Type: In-Person




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

Virtual Memory actually can be regarded as an table with tow columns. one of the column is physical address and the other column is the real place where the data is located. When OS need to read or write a data, it can get the data by looking up virtual memory.

The reason we need virtual memory is that the RAM size is limited. most of our data is stored in disk or memory. But as far as OS concern, he just know the physical address of its data and do not know where the data really is. So he needs to look up virtual memory to find out!

- Jun March 03, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Windows provides an illusion of a flat virtual address space (4GB), when in reality, there is a much smaller amount of physical memory. The hardware memory management unit of today’s microprocessors provides a way for the OS to map virtual addresses to physical address and it does this in the granularity of a page. The Windows Memory manager implements a demand paged virtual memory subsystem which is another way of saying that it is a lazy allocator. In other words, if you launch an application such as Notepad, it does not launch the entire application and appropriate DLLs into physical memory. It does so as the application demands: as Notepad touches code pages, as it touches data pages, it's at that point where the memory manager will make a connection between virtual memory and physical memory, reading in contents off disk as needed. In short, it is a common misconception that the memory manager reads the entire executable image off of the disk. An example of this can be illustrated using process monitor and setting the filter to something that has been run since a reboot, say, solitaire. After launching solitaire, solitaire is on the disk. Solitaire, as it starts up, is causing page faults, reading pieces of its own executable off of the disk on demand. When you stop the logging of the trace-gathered information and look, you will see an example of a process, sol.exe, reading sol.exe: it is reading itself, faulting itself onto disk.

- Geek April 08, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In computing, virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various forms of computer data storage (such as random-access memory and disk storage), allowing a program to be designed as though there is only one kind of memory, "virtual" memory, which behaves like directly and contiguous addressable read/write memory.

- yesudas March 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It is a feature of operating system. It allows the process to use more memory space than actual amount in the RAM. (Basically some of the contents of the process are stored in the disk). The operating system divides the physical memory into pages, when a process' memory address is referred, the memory manager fetches the page from disk and loaded to available memory.

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

Let’s say that an operating system needs 120 MB of memory in order to hold all the running programs, but there’s currently only 50 MB of available physical memory stored on the RAM chips. The operating system will then set up 120 MB of virtual memory, and will use a program called the virtual memory manager (VMM) to manage that 120 MB. The VMM will create a file on the hard disk that is 70 MB (120 – 50) in size to account for the extra memory that’s needed. The O.S. will now proceed to address memory as if there were actually 120 MB of real memory stored on the RAM, even though there’s really only 50 MB. So, to the O.S., it now appears as if the full 120 MB actually exists. It is the responsibility of the VMM to deal with the fact that there is only 50 MB of real memory.

Now, how does the VMM function? As mentioned before, the VMM creates a file on the hard disk that holds the extra memory that is needed by the O.S., which in our case is 70 MB in size. This file is called a paging file (also known as a swap file), and plays an important role in virtual memory. The paging file combined with the RAM accounts for all of the memory. Whenever the O.S. needs a ‘block’ of memory that’s not in the real (RAM) memory, the VMM takes a block from the real memory that hasn’t been used recently, writes it to the paging file, and then reads the block of memory that the O.S. needs from the paging file. The VMM then takes the block of memory from the paging file, and moves it into the real memory – in place of the old block. This process is called swapping and the blocks of memory that are swapped are called pages. The group of pages that currently exist in RAM, and that are dedicated to a specific process, is known as the working set for that process.

credits: programmerinterview(dot)com

- vython September 02, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 3 vote

Virtual memory is part of secondary storage devices which is used when there is no space in Ram for the processes means as most of the system today are multiprocessors so in RAM at one time more then proscesses stay so when one process time quantum expires , it swap to secondary storage in a particulr area called as virtual memory .So this is mainly used for swapping in and swapping out of processes.

- pinnacle January 23, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

bad

- rabi March 26, 2013 | 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