CS 430 -- Operating Systems -- Dilbert Days
General Topics
-
(True/False) It is faster to access a random part of physical RAM than
it is to seek to a random spot on the hard drive.
-
What is the most common reason Dilbert wants to overlap computation
and I/O?
-
Otherwise operating system class would be boring.
-
DOS does not, so there is no need to.
-
Some common computations are not possible without overlapping computation
and I/O.
-
Total system throughput can be faster with overlapped computation and I/O.
-
Babies are quite messy
Operating Systems Structures
-
Put an 'R' next to uses of a real time operating system, an 'M' next to
uses of a mulituser-at-one-time (UNIX or MVS) operating system, and an
'S' next to uses of a single user at any one time (like Windows NT) operating
system.
______ Control the Areane 5 rocket motor
______ Control the brakes on my mother's car
______ Run the computer that my girlfriend (she lives alone) uses to access
AOL
______ Manage the inventory of hamburgers for McDonalds
-
Many times real time operating systems do not have virtual memory.
Why might that be?
-
List two functions normally found in a microkernel, and two functions normally
found in a normal kernel that are typically left out of the kernel in a
microkernel.
IN _______________________________________________________________________
IN _______________________________________________________________________
OUT _____________________________________________________________________
OUT _____________________________________________________________________
-
Suppose I want to access a file on a computer managed by a microkernel.
What would I do to access the file?
-
Suppose I wanted to write a device driver that accessed a device that could
not generate a hardware interrupt. It can be accessed by reading
and writing to special parts of memory. Could this device be used?
How might the driver work?
Memory Management
-
I want to have a multitasking operating system, but Dogbert (Dilbert's
boss) is making Dilbert use a CPU without an MMU. Dilbert is
going to swap each task into RAM, run it for a time slice, and then swap
the next task into the same place in RAM. Each process has 50 pages,
and dirties ten of its pages per time slice. It takes 10 ms to read
or write a page to disk. How long does it take to swap from one task
to the next? __________ (show work!!)
-
If a time slice lasts 1 second (including transfer time), what percent
of the CPU's useful work is wasted on transfering data back and forth?______
-
(Disk/Net) Suppose Catbert has a computer that allows him to seek to any
disk page in 10 ms, and transfer 1 page/ms thereafter. He can also
access a RAMdisk across a network with a 1 ms latency and 3 ms/page transfer
rate. Catbert wishes to implement a virtual memory subsystem for
an application that is essentially random in its access patterns.
Which would be faster? Why?
-
It takes more hardware to implement pages than segments, yet most computers
use pages to implement virtual memory instead of segments. Why?
-
(Normal/Inverted) Alice has a computer with 24 M of physical RAM and a
processor with a 4G virtual address space. Alice has ten processes
each of which uses 40M of virtual address space. A page is
1K. A page table entry takes 24 bytes. Linus Torvalus just
had a new baby. The month is April. The computer's mouse has
12 buttons (ya right!). Which will take less space to store, a direct
(normal) page table or an inverted page table?
Scheduling and Processes
-
(Thread/Process) Which is quicker, to switch between two different processes
or between two different threads of the same process?
-
Circle all of the scheduling algorithms that can exhibit starvation
Round Robin
First Come First Serve
Shortest Job Next
Baby Comes Next
-
Some schedulers divide processes into two categories. Category one
processes offer a large time quantum but are scheduled infrequently.
Category two processes have a small time slice and are scheduled frequently.
In either case the total amount of CPU cycles offered per unit time
is the same. Which category would be best for interactive tasks and
why?
File Systems
-
Dilbert has a file system where each data block contains a pointer to the
next block, as shown below. His normal application will access files
in a sequential order from the beginning. Is this file system structure
reasonably efficient? Why?
+----+ +-----+
+-----+ +-----+
| |------>| |---->|
|---->| |---->
+----+ +-----+
+-----+ +-----+
-
Suppose Catbert wants to access files in reverse order (last byte first,
first byte last). How does this scheme perform now, and why?
Protection and Security
-
Circle all of the following that should be protected in a multiuser system
from access by normal users.
Write access to the hard drive controller
Read access to the network interface
Read access to the real time clock
Write access to the MMU
The kernel's stack
-
Suppose Dogbert and Catbert want to verify a secret password between two
computers over a network that they know has snoopers. What should
they do?