Midterm -- A real Fight for Knowledge Name:
________________________
- Very Basic Stuff (batch vs real time vs timeshare, multiprogramming
and multiprocessing, I/O and computation overlap, storage heirarchy, virtual
machines, privelaged instructions. interrupts. system structure)
- Putting sixty pounds on your back, getting in a long line with lots
of other soldiers, and marching slowly towards the enemy's machine gun
nest is
- A fashionable world war one tactic.
- Only smart if your a general, not if you're a normal soldier.
- Something any patriot would due for his nation.
- Looks really silly if your wearing a gas-mask.
- (True/False) The machine-level instruction to read the real-time
clock should be a privledged instruction.
- Which functions would one normally find in a micro-kernel? (circle
ONE)
- Interprocess communications
- Memory management
- CPU scheduling
- None or all of the above
- Never get in a fox-hole with anyone braver than yourself.
- (Yes/No) Consider a machine with no hard drive or floppy drive or tape
or virtual memory but does include a normal, modern CPU. Does this machine
still have a memory heirarchy?
- What is a "virtual machine"? ______________________________________
___________________________________________________________
- Which are normally functions of an interrupt? Circle all that apply.
- Let the operating system know there is data ready on some device like
a disk or serial port.
- Allow the O.S. to get control from user-level applictaions that are
in an infinite loop.
- Tell the operating system that a user-level application has changed
the program counter.
- Repeated interrupts can give the CPU something to do when it has
no useful work.
- Remeber: shooting at the enemy attracts return fire.
- (Yes/No) Some O.S.'s use interrupts to implement system calls. In these
O.S.'s should the interupt instruction be a privledged instruction.
- When an interrupt occurs, what happens to the Program Counter?
______________________________________________________________
______________________________________________________________
- Which nation lost the most people in World War II?
- The U.S.
- Rumania.
- Poland.
- Russia.
- What is the difference between 'hard real time' and 'soft real time'
(circle JUST ONE).
- Hard real time, unlike soft real time, involves constraints that can
not all be satisfied simoltainiously.
- Soft real time will tolerate the occasional ocasional late answer,
hard real time will not.
- Hard real time generally solves larger problems than soft real time.
- France (under Napoleon) was the first nation to invent the draft.
- None or all of the above.
- Which of the following things are needed to make a multi-user operating
system with protection between users? (circle all that apply)
- A memory management unit.
- Privledged as well as unprivleged instructions.
- A compiler that enforces protection between users.
- None of the above.
- Process Management (process and thread definitions, process
queues, scheduling algorithms, definition of critical section, semaphores,
starvation, hardware support for semaphores, deadlocks, fork and system
paradym, context switching, short vs medium vs long term scheduling)
- Which type of operating system is most likely to accept process starvation
if need be?
- Batch O.S.
- Interactive O.S.
- Real-time O.S.
- Consider a process with multiple threads. Put a 'P' next to those things
that all threads in the process share. Put a 'T' next to those things that
are not shared.
- Stack.
- Address space.
- Program counter.
- Open file descriptors.
- Set of registers.
- What processes are on the "ready" queue? ______________________
_____________________________________________________
_____________________________________________________
- When a process is finished waiting for an I/O to complete, it normally
moves to the
- Run Queue
- Ready Queue
- Wait Queue
- Willing-and-able queue.
- Exit(terminate) queue.
- What scheduler algorithm is most common among UNIX and WINDOWS NT like
machines (machines that are interactive with people and have protection
amoung processes) (circle only ONE)?
- First come first serve.
- Shortest job next with preemption.
- Shortest job next without preemption.
- None of the above.
- All of the above except that choice containing the word "none".
- (True/False) A process does a fork(), creating a parent and a child.
The parent and child normally continue to share the same code segment.
- (True/False) Implementing semaphores requires special CPU instructions
on a multi-CPU computer using shared memory.
- Which of the following are reasonable strategies to deal with deadlock?
(circle ALL that apply)
- Require that no process holding a resource request more resources.
- Order resources and require that they be requested only in order.
- Use semaphores to lock resources in use.
- Keep track of the "wait-for" graph. Kill any process needed
to brake loops in the wait-for graph.
- None of the above (damn it!)
- Please tell me one advantage of round-robin over first come first serve.
____________________________________________________________________
____________________________________________________________________
- (Yes/No) On a system with a normal page table, does a context switch
between two different processes require changing the page table?
- What is a TLB (Translation Lookaside Buffer) (chose ONE)
- A cache onto normal RAM for faster access.
- A cache onto the segment registers for a segmented memory scheme.
- A cache onto the page table for a page-based memory scheme.
- A cache onto device registers for faster access.
- All or none of the above.
- Memory Management (address binding, dynamic libraries,
sharing memories, copy-on-write, overlays, MMUs, physical and virtual addresses,
segments and pages, virtual memory, page replacement algorithms, required
hardware, internal and external fragmentation)
- (True/False) No successful kamakazi pilot lived thru his attack.
- (True/False) memory management using overlays will likely use memory
more effeciently than a paged memory scheme implemented in the O.S.
- In a normal paging memory scheme, what is the average waste of memory
per allocation due to fragmentation? ________________________________________________
- Suppose that some machine has a physical memory size of 16M installed
(that's 2^24). How many bits are needed to represent its virtual addresses.
______________________________
- Suppose you want multiple processes in memory at one time, and yet
have no MMU. What should you do?
- Use run time binding
- Use compile time binding
- Use load time binding
- This cannot be done without an MMU.
- On a machine with 32 bit addresses and a page table containing 2^20
pages, how large is each page?
_______________________
- One problem with the Least Recently Used page replacement algorithm
is ... (choose ONE)
- Can be unfair to processes that need lots of CPU time.
- Is not the proveably optimal strategy like the frequency based approaches.
- Requires perfect knowledge of the future like Belady's Min.
- Has a common worst case.
- None of the above.
- All of the above except that choice containing the word "none".
- The clock algorithm chooses as pages suitable for replacement (choose
ONE)
- Pages that have not been used for a while (like LRU)
- Pages that belong to low-priority processes (like process-based schemes)
- Pages of the operating system's code
- Pages that were brought in longest ago (like FIFO).
- One advantage of inverted page tables over normal page tables is (circle
ALL that apply)
- Inverted page tables are normally smaller than normal page tables.
- Inverted page tables are easier to implement for a CPU/MMU designer.
- Inverted page tables, unlike normal page tables, can only allocate
memory in page-sized chunks.
- None or all of the above.
- One advantage of a segmented memory scheme compared to normal page
tables is (circle ALL that apply)
- The data required by segmented memory schemes are normally smaller
than normal page tables.
- The hardware required for segmented memory schemes is easier to implement
for a CPU/MMU designer.
- Segmented memory schemes, unlike normal page tables, can only allocate
memory in page-sized chunks.
- None or all of the above.
- If I have to be wounded in battle, I prefer
- A spear thru the chest -- I'll see who killed me.
- A bullet from a civil war musket. It may not move fast, but it leaves
a BIG hole.
- Poisen gas from WWI. I'll have time to think about my life as I pass
away.
- Smart people don't fight -- they work in supply.
- Extra Credit (not really)
- Who wrote "The Art of War"?