Mid1_Revision
Download
Report
Transcript Mid1_Revision
Mid#1 Revision
CH1 Mind map
Ch2 Mind map
Types of Questions
•
•
•
•
•
Short Answers (essay)
True/False
MCQ
Problems
Code to trace
Short Answer
• Q: what is the benefit of using the TOP
command?
– it is useful for showing which processes are
consuming the most OS resources at any time.
• Q: What is the difference between heap and
stack?
– Stack: for keeping track of subroutine calls.
– Heap: for Intermediate data computation.
Short Answers
• Define a monolithic kernel and compare it to a
microkernel?
• A monolithic kernel essentially is designed to have all the
system services encapsulated in one module with a tight
communication and sharing of structures between the
individual OS components. As opposed to a microkernel
which takes the different tact of providing a set of
minimal functions in the kernel and implement higher
level OS features in other modules (running either in
user mode or kernel mode). As monolithic kernel if it can
be made bug free can on average perform better than a
microkernel system that has some additional
communication overhead between components.
Short Answers
• What is the purpose of interrupts? What are the
differences between a trap and an interrupt? Can traps
be generated intentionally by a user program? If so, for
what purpose? (from your textbook)
• Answer: An interrupt is a hardware-generated change-offlow within the system. An interrupt handler is summoned
to deal with the cause of the interrupt; control is then
returned to the interrupted context and instruction. A trap
is a software-generated interrupt. An interrupt can be
used to signal the completion of an I/O to obviate the
need for device polling. A trap can be used to call
operating system routines or to catch arithmetic errors.
True or False
• Process scheduler selects an available
process for program execution on the
CPU. The operating system uses short
term scheduler to schedule processes for
the first few hours after booting a machine.
Afterwards, it uses the long term
scheduler. The specific durations to use
the short term and long term scheduler
can be configured while building the
kernel. True or False?
MCQ
• Which context switch is faster?
– Between threads.
– Between processes.
• A process created by using the fork()
system call in UNIX
– Shares its address space with its parent.
– Gets an identical copy of the address space
of its parent.
Problems
• In a short-term scheduler it takes 10ms to
decide to execute a process for 50ms,
what percent of the CPU time is being
wasted by scheduling time?
• 10/(50+10)=6 %
• Code to Trace - similar to what has been
covered in the Tutorial.