a. Stealing or copying one’s programs or data; using system resources (CPU, memory, disk space, peripherals) without proper accounting.
b. Probably not, since any protection scheme devised by humans can inevitably be bro-ken by a human, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation.
2.Under what circumstances would a user be better off using a time-sharing system, rather
than a personal computer or single-user workstation?
When there are few other users, the task is large, and the hardware is fast, time-sharing makes sense. The full power of the system can be brought to bear on the user’s problem. The problem can be solved faster than on a personal computer. Another case occurs when lots of other users need resources at the same time. A personal computer is best when the job is small enough to be executed reasonably on it and when performance is sufficient to execute the program to the user’s satisfaction.
3.How does the distinction between monitor mode and user mode function as a rudimentary form of protection (security) system?
By establishing a set of privileged instructions that can be executed only when in the monitor mode, the operating system is assured of controlling the entire system at all times.
4.What are the differences between a trap and an interrupt? What is the use of each function?
An interrupt is a hardware-generated change-of-flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction. A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an
I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors. 5.What is the purpose of system programs?
System programs can be thought of as bundles of useful system calls. They provide basic functionality to users and so users do not need to write their own programs to solve common problems.
6.What are the main advantages of the microkernel approach to system design?
Benefits typically include the following (a) adding a new service does not require modifying the kernel, (b) it is more secure as more operations are done in user mode than in kernel mode, and (c) a simpler kernel design and functionality typically results in a more reliable operating system.
7.What is the difference between a distributed OS and network OS?
8.Mention some examples of application programs.
WWW browser, Word processor, Email reader, etc.
9.What are the advantages of layered OS structure?
Independence. Allows for expansion and enhancement. Easy to debug.
10.How the RTOS (Real-time OS) would differ from a typical OS? Give examples of both OS.
RTOS is used in time- or mission-critical systems. Exampes of RTOS are PSOS, Vertex, VxWorks, etc. Examples of typical OS are NT, Unix, etc.
12.Is the compiler part of the OS? If not, why not?
No. To allow for flexibility and enhancement. The user can choose whatever s/he likes.
13.What issues should an OS engineer take into consideration when designing an OS?
Maintainability, reliability, efficiency, memory size, etc.
14.Which of the following instructions should be allowed only in kernel mode:
a. Disable all interrupts
b. Read the time-of-day clock
c. Change the system memory map.
A and C.
15. What are two differences between user-level threads and kernel-level
threads? Under what circumstances is one type better than the other?
(1) User-level threads are unknown by the kernel, whereas the kernel is
aware of kernel threads. (2) User threads are scheduled by the thread library
and the kernel schedules kernel threads. (3) Kernel threads need not be associated with
a process whereas every user thread belongs to a process.
16. Describe the actions taken by a kernel to context switch between kernel-level threads.
Context switching between kernel threads typically requires saving the value of
the CPU registers from the thread being switched out and restoring the CPU registers of
the new thread being scheduled.
17. In handling Web client requests, the Web server usually spawns off a thread per request, but not a process per request. Explain why!
Benefits of threads over processes. Refer to class notes.
18. When suspending (i.e. swapping) a multi-threaded process, all of its threads stop running. Explain why!
The text segment or code is not available for all the threads.
19. When performing a context switch, the old process information is saved. Where does such information get saved?
In the PCB structure.