Purchase Solution

Memory Management

Not what you're looking for?

Ask Custom Question

I need help with the following problem.

Decribe in a few paragraphs
Which of the following components is responsible for loading the initial value in the program counter for an application program before it starts running:
• Compiler
• Linker
• Loader
• Boot module or boot ROM
Identify three styles of switching from user mode to supervisor mode.
Explain the steps that an operating system goes through when the CPU receives an interrupt.
Describe the advantages of using a MMU (memory management unit) that incorporates segmentation and paging over ones that either use pure paging or pure segmentation.
Describe how an operating system that uses paging could make stacks grow dynamically if the original size proves too small. What would the page table data structures look like? Explain what would happen when a thread's stack grows past the area that has been allocated for it (e.g., how would the OS notice this fact, and what would happen inside the OS when it notices this fact). Could a similar effect be achieved with multi-level page tables? Segments? Paged segmentation? Inverted page tables?

Attachments
Purchase this Solution

Solution Summary

The expert examines the components of memory management.

Solution Preview

Contents
Question 1 2
Answer 1 2
Question 2 2
Answer 2 2
Question 3 2
Answer 3 2
Question 4 3
Answer 4 3
Question 5 3
Answer 5 3
Question 6 3
Answer 6 3
Inverted page table 4
Multilevel page table 5
Virtualized page table 5
Question 7 5
Answer 7 5
Question 8 6
Answer 8 6

I need help with the following problem.

Decribe in a few paragraphs
Question 1
Which of the following components is responsible for loading the initial value in the program counter for an application program before it starts running:
• Compiler
• Linker
• Loader
• Boot module or boot ROM
Answer 1
Loader

Question 2
Identify three styles of switching from user mode to supervisor mode.
Answer 2
1. Interrupts, when a device sends an interrupt to the CPU.
2. When a program executes a system call, which is usually implemented by a trap instruction.
3. When a program performs an operation that causes a hardware exception, such as divide by zero, illegal memory access or execution of an illegal opcode.

Question 3
Explain the steps that an operating system goes through when the CPU receives an interrupt.
Answer 3
• First, the hardware switches the machine to supervisor mode and causes control to transfer to a routine at a pre-specified address. The operating system has already loaded that address with a pointer to a function that handles the interrupt.
• The function starts by saving all registers, possibly setting the allowed interrupts to a level that guarantees correct execution of the operating system, and then executes the code to serve the interrupt.
• When the operating system is done, it restores the registers again and calls the "reti" to return to the user program that was running when the interrupt occurred.
• If there is no runnable program, the operating system jumps to the idle loop and waits for an interrupt.
• Finally, if the interrupt occurred while the operating system was running, then the OS simply restores the registers and jumps to the instruction following the
one at ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.