NAME_______________________________________________
This exam is closed book. You have 90 minutes. There are 16 questions
worth about 6 points each for a total of 100 points. Spend about 9 minutes on
each question. Partial credit is possible. All questions have relatively short
answers. Write legibly! If you have
questions, raise your hand. Good luck!
Final
Exam – topics
·
Old
material (4)
·
VFS
(2)
·
Block
Devices (1)
·
Disk
Caches / Regular Files (1)
·
Swapping
(2)
·
Ext2
(2)
·
IPC
(2)
·
Program
Execution (2)
Old Topics (7 points each)
1. Describe the differences between the physical, logical, linear and i/o (bus) address spaces
on the Intel processor.
2. The top-half of the timer interrupt handler
basically increments the jiffies
variable and defers most other timing related tasks to the bottom-half. What
does the timer bottom-half do?
3. Why are parameters for system calls passed in registers and not on the stack? What is
the calling convention if there are more
parameters than registers?
4. How long is the default quantum used by the Linux scheduler? Discuss the choice of quantum length. For example, what
happens if the quantum is too long
or too short?
VFS
5. Why is
the dentry cache critical to overall
system performance? How does Linux ensure that in-memory dentries are consistent with the corresponding information on disk?
6. How is the inode operations field (i_op) related
to the file object operations field
(f_op)?
Block
Devices
7. Describe four optimizations that the kernel block device infrastructure
provides to simplify the life of block device driver writers.
Disk
Cache / Regular Files
8. Describe the role of the buffer and page caches in
Linux. What sort of disk accesses effect the buffer cache? What sort of
accesses effect the page cache?
Swapping
9. What is the difference between swapping and paging?
Describe two types of memory that
are subject to swapping in Linux. Describe
two types of memory that are not subject to swapping in Linux.
10. How does Linux
decide where to place a swapped out page?
Ext2
11. The Ext2
filesystem uses block clustering, pre-allocation and “directory inode de-clustering” as
performance optimizations. Explain.
12. How are the data blocks for files representing symbolic links used in Ext2?
IPC
13. Describe the kernel representation of a pipe in Linux.
14. User-level semaphores are different than kernel-level semaphores in Linux. Let’s say we just implemented four new system calls (sem_alloc(),
sem_dealloc(), sem_up(), sem_down()) that allowed the user to allocate and
access a kernel semaphore. Is this a
good idea or not? Explain.
Process
Execution
15. The layout of a
process address space in Linux includes a region for the “program interpreter” in addition to the more familiar regions
(stack, heap, code, etc.). What is the “program interpreter” for a C program?
16. Describe the capabilities
model used in the Linux kernel. What portion of the capabilities mechanism has
yet to be implemented in Linux?