What are the assumptions for the performance of a real system running process Mention the factors affect context switching time and interrupt latency Jun 14Jan 14 vtu question pape
The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions

Use Me  ?

New searches
Embedded-computing-systems-10CS72-->View question

What are the assumptions for the performance of a real system running process? Mention the factors affect context switching time and interrupt latency. Jun 14/Jan 14 vtu question pape

What are the assumptions for the performance of a real system running process?
Mention the factors affect context switching time and interrupt latency. Jun 14/Jan 14 vtu question paper 


By:arunwebber

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question
Talk about thisDelete|Like|Dislike|


Answers

Context switch:
A context switch is the computing process of saving and restoring the state (context) of a CPU such that multiple processes can share a single CPUresource. The context switch is an essential feature of a multitasking operating system.

Context switches are usually time consuming and much of the design of operating systems is to minimize the time of context switches.

A context switch can mean a register context switch, a task context switch, a thread context switch, or a process context switch. What will be switched is determined by the processor and the operating system. The scheduler is the part of the operating systems that manage context
switching, it perform context switching in one of the following conditions:

 1. Multitasking: One process needs to be switched out of (termed "yield" which means "give up") the CPU so another process can run. Within a preemptive multitasking operating system, the scheduler allows every task (according to its priority level) to run for some certain amount of time, called its time slice where a timer interrupt triggers the operating system to schedule
another process for execution instead.

If a process will wait for one of the computer resources or will perform an I/O operation, the operating system schedules another process for executioninstead.

 2. Interrupt handling: Some CPU architectures (like the Intel x86 architecture) are interrupt driven. When an interrupt occurs, the scheduler calls its interrupt handler in order to serve the interrupt after switching contexts; the scheduler suspended the currently running process till executing the interrupt handler. 

arunwebber

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------
3. User and kernel mode switching: When a transition between user mode and kernel mode is required in an operating system, a context switch is not necessary; a mode transition is not by itself a context switch. However, depending on the operating system, a context switch may also take place at this time.

Context switching can be performed primarily by software or hardware. Some CPUs have hardware support for context switches, else if not, it is performed totally by the operating system software. In a context switch, the state of a process must be saved somehow before running another process, so that, the scheduler resume the execution of the process from the point it was suspended; after restoring its complete state before running it again.

A process (also sometimes referred to as a task) is an executing (i.e., running)
instance of a program. In Linux, threads are lightweight processes that can run
in parallel and share an address space (i.e., a range of memory locations) and
other resources with their parent processes (i.e., the processes that created
them).

A context is the contents of a CPU's registers and program counter at any point in time. A register is a small amount of very fast memory inside of a CPU (as opposed to the slower RAM main memory outside of the CPU) that is used to speed the execution of computer programs by providing quick access to commonly used values, generally those in the midst of a calculation. A program counter is a specialized register that indicates the position of the CPU in its instruction sequence and which holds either the address of the instruction being executed or the address of the next instruction to be executed, depending on thespecific system.

Context switching can be described in slightly more detail as the kernel (i.e., the core of the operating system) performing the following activities with regard to processes (including threads) on the CPU:
(1) suspending the progression of one process and storing the CPU's state (i.e.,
the context) for that process somewhere in memory,
(2) retrieving the context of the next process from memory and restoring it in
the CPU's registers and
(3) returning to the location indicated by the program counter (i.e., returning to
the line of code at which the process was interrupted) in order to resume the
process. 

arunwebber

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!