Practice Questions
- Does Ubuntu use soft or hard modularity?
- Soft modularity
- Voluntary, caller callee can mess with each other
- Hard modularity
- More isolation
- Caller, callee can’t mess with each other
- Client server model, more cost of message passing
- Virtualization
- Ubuntu uses virtualization for hard modularity
- Also uses soft modularity
- Suppose x86 Xunil reverses pattern for sys calls—RETI instruction instead of INT
- Interrupt service vector
- Ecx, ebx, edx args. Eax syscall number. Interrupt 0x80.
- X86-64 uses new instructions to interrupt into kernel
- Could use this method—it’s a privileged instruction, so would work anyway
- Round Two Robin, when quantum expires, might 0.5 chance to let current process run.
- Utilization: % of time doing useful work of T2R slightly higher (less context switches)
- Wait time: Roughly the same
- Response time: worse
- Suppose compile some C program—what are the race conditions?
- Note: printf is not a sync safe, nor is the char n
- Output more than 256 lines? Interrupt after n++
- Successive lines of n=N: interrupt before n++