Operating Systems A system designer decides to build a system that does not prov
ID: 3671916 • Letter: O
Question
Operating Systems
A system designer decides to build a system that does not provide a privileged mode of operation in hardware. Is it possible to construct a secure operating system for this computer system? Explain your arguments both that it is and that it is not possible? In which cases a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-processor system? Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single-processor system? Suppose you want to write an operating system for a real-time environment what is main difficulty that you must overcome in programming such OS? Does multithreading always provide better performance than a single-threaded solution? If not provide two programming examples that prove your argument?Explanation / Answer
1)An operating system for a machine of this type would need to remain in control
(or monitor mode) at all times. This could be accomplished by two methods:
a. Software interpretation of all user programs (like some BASIC, APL, and LISP systems,
for example). The software interpreter would provide, in software, what the
hardware does not provide.
b. Require meant that all programs be written in high-level languages so that all object
code is compiler-produced. The compiler would generate (either in-line or by
function calls) the protection checks that the hardware is missing.
2)When a kernel thread suffers a page fault, another kernel
thread can be switched in to use the interleaving time in a useful manner.
A single-threaded process, on the other hand, will not be capable of
performing useful work when a page fault takes place. Therefore, in
scenarios where a program might suffer from frequent page faults or
has to wait for other system events, a multithreaded solution would
perform better even on a single-processor system.
3)A multithreaded system comprising of multiple user-level
threads cannot make use of the different processors in a multiprocessor
system simultaneously. The operating system sees only a single process
and will not schedule the different threads of the process on separate
processors. Consequently, there is no performance benefit associated
with executing multiple user-level threads on a multiprocessor system.
4)For real-time systems, the operating system needs to support
virtual memory and time sharing in a fair manner. For handheld systems,
the operating system needs to provide virtual memory, but does not
need to provide time-sharing. Batch programming is not necessary in
both settings.
5)(1) Any kind of sequential program is not a good candidate
to be threaded. An example of this is a program that calculates an individual
tax return. (2) Another example is a “shell” program such as
the C-shell or Korn shell. Such a program must closely monitor its own
working space such as open files, environment variables, and current
working directory
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.