Question

In: Computer Science

.What is the role of interrupt vector table during interrupt processing? b. How does OS make...

.What is the role of interrupt vector table during interrupt processing?

b. How does OS make sure that a user process cannot access I/O devices or any other process’ memory areas?

c. How is data parallelism different from task parallelism? Which one of these approaches would you use if you had to compute the average of an array of million numbers? Why?

d. What kind of events can cause a process to leave CPU?

e. What is the main different between heap and stack segments of a process?

Solutions

Expert Solution

a.

Interrupt vector table is the table containing set of interrupts and it occupies space in the addressable memory.

Every entry in the interrupt vector table will be reserved for a specific purpose.

whenever an interrupt occurs while executing a process.The interrupt service routine will refer to the interrupt vector table by matching the interrupt with it's related entry and solves the interrupt.

b.

Operating system is wholly responsible for granting permissions for processes.

OS only allows kernel programs to access other data.

If any user program tries to access other data then the OS will crashes or interlocks the user program.

c.

Task parallelism is the execution of multiple tasks on multiple cores at a time.

Data parallelism is the execution of segments of same task on multiple cores at a time.

When we deal with one million array,we have to use data parallelism since it is huge task but it is single task.

d.

A process can leave CPU in these situations:

1.When ansoftware interrupt(System call) occurs.

2.When the process completes execution.

3.When there is need of input output.(it is also a type of hardware interrupt).

4.When a higher priority process arrives.

e.

Heap:

it is for dynamic memory allocation.

Heap stores the data related to pointers i.e., Dynamic memory allocation i.e., Variables that are created at runtime.

Stack:

it is for static memory allocation.

Stack stores the data related to function calls,function executions,etc.,(Related to recursive functions).i.e.,Variables at compile time.


Related Solutions

What is an interrupt vector table. How do I create an interrupt vector table in Arm...
What is an interrupt vector table. How do I create an interrupt vector table in Arm Architecture . Please include as much information as you can, including pictures, examples etc. Thank you very much.
What is an interrupt vector? What is polling used for? What are the disadvantages of polling?
What is an interrupt vector? What is polling used for? What are the disadvantages of polling? What is a better way to perform the same job?
V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What...
V. How does ARM processor differentiate between a timer interrupt and an A/D interrupt? VI. What does privileged mode mean and what is the major difference between this mode and non-privileged mode? VII. There are two interrupt pins on ARM microprocessor: IRQ and FIQ. Which one can interrupt the other one and why?
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control...
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control branch to?
how does guanidine unfold myoglobin? what type of molecular interaction does it interrupt?
how does guanidine unfold myoglobin? what type of molecular interaction does it interrupt?
a) Explain how performance can be controlled in virtual memory. (b) How does the OS implement...
a) Explain how performance can be controlled in virtual memory. (b) How does the OS implement dynamic allocation of frames? c) Explain the main difficulty in using and/or managing virtual memory.
5. What is a trap? Give an example. How does it differ from an interrupt?
  5. What is a trap? Give an example. How does it differ from an interrupt? 6. Why does the Linux kernel handle certain interrupts in two stages: top half and bottom half? 7. What is a context switch? What is the role of the kernel in a context switch? 8. What is the maximum number of processes in the system at any time using the following code segment? extern char mypath[]; for ( int i = 0; i <...
What is the role of HCG during pregnancy? What does progesterone do during pregnancy? Explain how...
What is the role of HCG during pregnancy? What does progesterone do during pregnancy? Explain how estrogen levels change during pregnancy.
1. What is the mechanism of interrupts? 2. How does an interrupt occur? 3. How should...
1. What is the mechanism of interrupts? 2. How does an interrupt occur? 3. How should two or more simulations interrupt requests be handled?
How does page fault in OS be handled/resolved?
How does page fault in OS be handled/resolved?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT