Chapter 3 kernels
Chapter 3 Kernels
of the cumntly running process to collect proiiling data. Here, the idea₤
. 1lect a sample of the program counter of the currently running process. « :
the
3.4 Why does the system defer as much work as possible from high.
priority interrupts to lower-priority software-intermpt processes?
Many events in the kernel are driven by hardware interrupts. For high· Spt+ d
devices such as network controllers, these interrupts occur at a high priority.'
a network controller, it is important to acknowledge receipt of a packet and
quickly to reenable the controller to accept another packet, to avoid losing closely
spaced packets. However, the further processing of passing the packet to ih
destination process, although often time consuming, need not be done quickly
mus, a lower priority is desirable for the further processing, so that critical
operations are not blocked from executing for too long.
Typically, a high-priority interrupt creates a queue of work to be done at a
lower-priority level. After queueing a work request, the high-priority interrupt
posts a request for a function to be run at the lower-priority level. When the
machine priority drops below the lower priority, an interrupt is generated that
calls the requested function. If a higher-priority interrupt comes in while thc
function is executing, the function is preempted while the high-priority event
occurs.
3.5 What determines the shortest (nonzero) time period that a user
process can request when setting a timer?
me shortest time a user process can request in a timer is 1 microsecond (that is
the resolution of a struct timevai). However, the shortest time period for a timer
interrupt is determined by the frequency of the system clock. The system clock
on the VAX is set to run at 100 interrupts per second; thus, the shortest period that
a user process can usefully request is 10 milliseconds.
3.6 How does the kernel determine the system call for which it has been
invoked?
on the VAX, the hardware instruction that causes a system-call trap has a single
numeric parameter that is passed into the kernel. This parameter is used as an
that do not have a numeric parameter associated with their systenr-call trap
way, SUCH as by begin placed in a register or by being pushed onto the run. Tinlc
stack
3,7 Iiow are inltlalized data represented in an executable nie? How al«
unlnltlalized« lata represented the
r e preientations different? in an executable tile? Why afe
of the cumntly running process to collect proiiling data. Here, the idea₤
. 1lect a sample of the program counter of the currently running process. « :
the
3.4 Why does the system defer as much work as possible from high.
priority interrupts to lower-priority software-intermpt processes?
Many events in the kernel are driven by hardware interrupts. For high· Spt+ d
devices such as network controllers, these interrupts occur at a high priority.'
a network controller, it is important to acknowledge receipt of a packet and
quickly to reenable the controller to accept another packet, to avoid losing closely
spaced packets. However, the further processing of passing the packet to ih
destination process, although often time consuming, need not be done quickly
mus, a lower priority is desirable for the further processing, so that critical
operations are not blocked from executing for too long.
Typically, a high-priority interrupt creates a queue of work to be done at a
lower-priority level. After queueing a work request, the high-priority interrupt
posts a request for a function to be run at the lower-priority level. When the
machine priority drops below the lower priority, an interrupt is generated that
calls the requested function. If a higher-priority interrupt comes in while thc
function is executing, the function is preempted while the high-priority event
occurs.
3.5 What determines the shortest (nonzero) time period that a user
process can request when setting a timer?
me shortest time a user process can request in a timer is 1 microsecond (that is
the resolution of a struct timevai). However, the shortest time period for a timer
interrupt is determined by the frequency of the system clock. The system clock
on the VAX is set to run at 100 interrupts per second; thus, the shortest period that
a user process can usefully request is 10 milliseconds.
3.6 How does the kernel determine the system call for which it has been
invoked?
on the VAX, the hardware instruction that causes a system-call trap has a single
numeric parameter that is passed into the kernel. This parameter is used as an
that do not have a numeric parameter associated with their systenr-call trap
way, SUCH as by begin placed in a register or by being pushed onto the run. Tinlc
stack
3,7 Iiow are inltlalized data represented in an executable nie? How al«
unlnltlalized« lata represented the
r e preientations different? in an executable tile? Why afe
Thanks
Venkata Pilaka
Comments
Post a Comment