- [8 pts] Name a primary purpose of an operating system.
An operating system manages hardware resources (providing
easy access to user programs, allocating resources between programs,
and protecting resources from damage by programs).
- [9 pts] Name three specific pieces of data found in a typical
page table entry.
- page frame number (telling where page is in physical memory)
- invalid bit (tracking whether page is currently in physical memory)
- dirty bit (telling whether the page in memory has been modified)
- referenced bit (telling whether the page in memory has been
accessed)
- [9 pts] What distinguishes a thread from a process?
Each process gets its own set of resources (memory, file
descriptors, etc), while threads share the same set of resources within
a process.
- [8 pts] We discussed the relative merits of implementing
threads as a kernel-independent user library (user-level
threads) and of implementing threads via system calls to the
kernel (kernel-level threads). Explain an advantage of one of
the approaches over the other. Be sure to mention which approach your
point supports.
Some of the better answers:
- User-level threads gain efficiency, since they do not incur the
significant cost of switching frequently between user mode and kernel
mode in the CPU.
- When a thread incurs a page fault, other kernel-level threads can
continue working, whereas user-level threads must stall.
- Programs using user-level threads rely less heavily on operating
system support and hence are more portable.
- [8 pts] We discussed three capabilities that TCP provides on
top of IP. Name two of them.
- TCP provides reliable delivery of messages.
- TCP provides program-to-program delivery (whereas IP only
delivers between computers.
- TCP provides a continuous connection (whereas IP packets
are independent of each other).
- [8 pts] What is the purpose of the sliding window
concept in TCP?
It allows the computer to send large messages more quickly
by keeping several segments of the message in transit at
once.