All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
operating systems internals and design principles
Questions and Answers of
Operating Systems Internals And Design Principles
A 1 x DVD reader can deliver data at a rate of 1.32 MB/sec. What is the highest speed DVD drive that could be connected over a USB 2.0 connection without losing data?
Many disks contain an ECC at the end of each sector. If the ECC is wrong, what actions might be taken and by which piece of hardware or software?
After receiving a CTRL-C (SIGINT) character, the MINIX driver discards all output currently queued for that terminal. Why?
Implement the UNIX PROFIL system call, which is missing from MINIX.
What are the two main functions of an operating system?
What is the difference between kernel mode and user mode? Why is the difference important to an operating system?
What is spooling? Do you think that advanced personal computers will have spooling as a standard feature in the future?
Why was timesharing not widespread on second-generation computers?
Which of the following instructions should be allowed only in kernel mode?(a) Disable all interrupts.(b) Read the time-of-day clock.(c) Set the time-of-day clock.(d) Change the memory map.
List some differences between personal computer operating systems and mainframe operating systems.
Give one reason why a closed-source proprietary operating system like Windows should have better quality than an open-source operating system like Linux. Now give one reason why an open-source
A MINIX file whose owner has UID = 12 and GID = 1 has mode rwxr-x---. Another user with UID = 6, GID = 1 tries to execute the file. What will happen?
In view of the fact that the mere existence of a superuser can lead to all kinds of security problems, why does such a concept exist?
All versions of UNIX support file naming using both absolute paths (relative to the root) and relative paths (relative to the working directory). Would it be possible to dispose of one of these and
Why is the process table needed in a timesharing system? Is it also needed in personal computer systems in which only one process exists, that process taking over the entire machine until it is
In MINIX 3 if user 2 links to a file owned by user 1, then user 1 removes the file, what happens when user 2 tries to read the file?
Are pipes an essential facility? Would major functionality be lost if they were not available?
Modern consumer appliances such as stereos and digital cameras often have a display where commands can be entered and the results of entering those commands can be viewed. These devices often have a
Examine the list of system calls in Fig. 1-9. Which call do you think is likely to execute most quickly. Explain your answer. Process management Signals pid= fork()) pid = waitpid(pid, &statloc,
Windows does not have a fork system call, yet it is able to create new processes. Make an educated guess about the semantics of the system call Windows uses to create new processes.
Why is the chroot system call limited to the superuser?
There is a mknod system call in Fig. 1-16 but there is no rmnod call. Does this mean that you have to be very, very careful about making nodes this way because there is no way to every remove them?
Suppose that a computer can execute 1 billion instructions/sec and that a system call takes 1000 instructions, including the trap and all the context switching. How many system calls can the computer
Why does MINIX 3 have the program update running in the background all the time?
Does it ever make any sense to ignore the SIGALRM signal?
The client-server model is popular in distributed systems. Can it also be used in a singlecomputer system?
The initial versions of the Pentium could not support a virtual machine monitor. What essential characteristic is needed to allow a machine to be virtualizable?
Write a shell that is similar to Fig. 1-10 but contains enough code that it actually works so you can test it. You might also add some features such as redirection of input and output, pipes, and
Write a program (or series of programs) to test all the MINIX 3 system calls. For each call, try various sets of parameters, including some incorrect ones, to see if they are detected.
Why is multiprogramming central to the operation of a modern operating system?
Redraw Fig. 2-2 adding two new states: New and Terminated. When a process is created, it is initially in the New state. When it exits, it is in the Terminated state. Blocked Running 2 Ready 1.
What are the three main states that a process can be in? Describe the meaning of each one briefly.
What is the fundamental difference between a process and a thread?
In a system with threads, is there normally one stack per thread or one stack per process? Explain.
What is a race condition?
Give an example of a race condition that could possibly occur when buying airplane tickets for two people to go on a trip together.
Consider a computer that does not have a TEST AND SET LOCK instruction but does have an instruction to swap the contents of a register and a memory word in a single indivisible action. Can that be
Is a statement like ln file file.lock an effective locking mechanism for a user program like the scripts used in the previous problem? Why (or why not)?
In the solution to the dining philosophers problem (Fig. 2-20), why is the state variable set to HUNGRY in the procedure take_forks? #define N #define LEFT #define RIGHT #define THINKING void
A fast food restaurant has four kinds of employees: (1) order takers, who take customer’s orders; (2) cooks, who prepare the food; (3) packaging specialists, who stuff the food into bags; and (4)
Suppose that we have a message-passing system using mailboxes. When sending to a full mailbox or trying to receive from an empty one, a process does not block. Instead, it gets an error code back.
The CDC 6600 computers could handle up to 10 I/O processes simultaneously using an interesting form of round-robin scheduling called processor sharing. A process switch occurred after each
A process running on CTSS needs 30 quanta to complete. How many times must it be swapped in, including the very first time (before it has run at all)?
In Fig. 2-25 we saw how three-level scheduling works in a batch system. Could this idea be applied to an interactive system without newly-arriving jobs? How?
The aging algorithm with a = 1/2 is being used to predict run times. The previous four runs, from oldest to most recent, are 40, 20, 40, and 15 msec. What is the prediction of the next time?
Suppose that the threads of Fig. 2-28(a) are run in the order: one from A, one from B, one from A, one from B, etc. How many possible thread sequences are there for the first four times scheduling is
A soft real-time system has four periodic events with periods of 50, 100, 200, and 250 msec each. Suppose that the four events require 35, 20, 10, and x msec of CPU time, respectively. What is the
During execution, MINIX 3 maintains a variable proc_ptr that points to the process table entry for the current process. Why?
MINIX 3 does not buffer messages. Explain how this design decision causes problems with clock and keyboard interrupts.
When a message is sent to a sleeping process in MINIX 3, the procedure ready is called to put that process on the proper scheduling queue. This procedure starts out by disabling interrupts. Explain.
MINIX 3 essentially uses the scheduling method in Fig. 2-43, with different priorities for classes. The lowest class (user processes) has round-robin scheduling, but the tasks and servers always are
The MINIX 3 procedure mini_rec contains a loop. Explain what it is for.
Modify the hwint_master and hwint_slave macros in mpx386.s so the operations now performed by the save function are performed inline. What is the cost in code size? Can you measure an increase in
Is MINIX 3 suitable for real-time applications, such as data logging? If not, what could be done to make it so?
Assume that you have an operating system that provides semaphores. Implement a message system. Write the procedures for sending and receiving messages.
A student majoring in anthropology and minoring in computer science has embarked on a research project to see if African baboons can be taught about deadlocks. He locates a deep canyon and fastens a
Repeat the previous problem, but now avoid starvation. When a baboon that wants to cross to the east arrives at the rope and finds baboons crossing to the west, he waits until the rope is empty, but
Solve the dining philosophers problem using monitors instead of semaphores.
Add code to the MINIX 3 kernel to keep track of the number of messages sent from process (or task) i to process (or task) j. Print this matrix when the F4 key is hit.
Modify the MINIX 3 scheduler to keep track of how much CPU time each user process has had recently. When no task or server wants to run, pick the user process that has had the smallest share of the
Modify MINIX 3 so that each process can explicitly set the scheduling priority of its children using a new system call setpriority with parameters pid and priority.
Explain all of the items displayed by the MINIX 3 sysenv command on your MINIX 3 system. If you do not have access to a running MINIX 3 system, explain the items in Fig. 2-37.
In the discussion of initialization of the process table we mentioned that some C compilers may generate slightly better code if you add a constant to the array instead of the index. Write a pair of
Modify MINIX 3 to collect statistics about messages sent by whom to whom and write a program to collect and print these statistics in a useful way.
What is memory-mapped I/O? Why is it sometimes used?
Explain what DMA is and why it is used.
Although DMA does not use the CPU, the maximum transfer rate is still limited. Consider reading a block from the disk. Name three factors that might ultimately limit the rate of transfer.
CD-quality music requires sampling the sound signal 44,100 times per second. Suppose that a timer generates an interrupt at this rate and that each interrupt takes 1 microsec to handle on a 1-GHz
An alternative to interrupts is polling. Are there any circumstances you can think of in which polling is a better choice?
Disk controllers have internal buffers and they are getting larger with each new model. Why?
Each device driver has two different interfaces with the operating system. One interface is a set of function calls that the operating system makes on the driver. The other is a set of calls that the
Why do operating system designers attempt to provide device-independent I/O wherever it is possible?
Consider Fig. 3-10. Suppose that in step (o) C requested S instead of requesting R. Would this lead to deadlock? Suppose that it requested both S and R? A C B 200 R S T (0) Figure 3-10. An example of
Why are output files for the printer normally spooled on disk before being printed?
Take a careful look at Fig. 3-13(b). If D asks for one more unit, does this lead to a safe state or an unsafe one? What if the request came from C instead of D? Has Max 1 6 1 5 2 4 4 7 Free:
All the trajectories in Fig. 3-14 are horizontal or vertical. Can you envision any circumstances in which diagonal trajectories were also possible?
Give an example of a deadlock that could occur in the physical world.
Suppose that process A in Fig. 3-15 requests the last tape drive. Does this action lead to a deadlock? Process A 3 B 0 C 1 D E 0 Tape drives 1 1 100 110 1 1 0 0 0 0 Resources
Consider the banker’s algorithm of Fig. 3-15. Assume that processes A and D change their requests to an additional (1, 2, 1, 0) and (1, 2, 1, 0) respectively. Can these requests be met and the
The message format of Fig. 3-17 is used for sending request messages to drivers for block devices. Could any fields be omitted for character devices? Which ones?
A computer has six tape drives, with n processes competing for them. Each process may need two drives. For which values of n is the system deadlock free?
Consider a disk with 1000 512-byte sectors/track, eight tracks per cylinder, and 10,000 cylinders with a rotation time of 10 msec. The track-to-track seek time is 1 msec. What is the maximum
A UNIX process has two parts—the user part and the kernel part. Is the kernel part like a subroutine or a coroutine?
Two examples of watchdog timers were given in the text: timing the startup of the floppy disk motor and allowing for carriage return on hardcopy terminals. Give a third example.
Why are RS232 terminals interrupt driven, but memory-mapped terminals not interrupt driven?
Consider how a terminal works. The driver outputs one character and then blocks. When the character has been printed, an interrupt occurs and a message is sent to the blocked driver, which outputs
A bitmap terminal contains 1200 by 800 pixels. To scroll a window, the CPU (or controller) must move all the lines of text upward by copying their bits from one part of the video RAM to another. If a
Why do operating systems provide escape characters, such as CTRL-V in MINIX?
Many RS232 terminals have escape sequences for deleting the current line and moving all the lines below it up one line. How do you think this feature is implemented inside the terminal?
On the original IBM PC’s color display, writing to the video RAM at any time other than during the CRT beam’s vertical retrace caused ugly spots to appear all over the screen. A screen image is
Write a graphics driver for the IBM color display, or some other suitable bitmap display. The driver should accept commands to set and clear individual pixels, move rectangles around the screen, and
Modify the MINIX floppy disk driver to do track-at-a-time caching.
Implement a floppy disk driver that works as a character, rather than a block device, to bypass the file system’s block cache. In this way, users can read large chunks of data from the disk, which
Modify the terminal driver so that in addition to a having a special key to erase the previous character, there is a key to erase the previous word.
A new hard disk device with removable media has been added to a MINIX 3 system. This device must spin up to speed every time the media are changed, and the spin up time is quite long. It is
Using the page mapping of Fig. 4-8, give the physical address corresponding to each of the following virtual addresses:(a) 20(b) 4100(c) 8300 Virtual address space 60K-64K X 56K-60K X 52K-56K
A computer system has enough room to hold four programs in its main memory. These programs are each idle half the time waiting for I/O. What fraction of the CPU time is wasted?
In Sec. 4.7.5, it was pointed out that on an exec call, by testing for an adequate hole before releasing the current process’ memory, a suboptimal implementation is achieved. Reprogram this
In Fig. 4-9, the page field of the virtual address is 4 bits and the page field of the physical address is 3 bits. In general, is it permitted for the number of page bits of the virtual address to be
A computer has 1 GB of RAM allocated in units of 64 KB. How many KB are needed if a bitmap is used to keep track of free memory?
Showing 1 - 100
of 302
1
2
3
4