• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/12

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

12 Cards in this Set

  • Front
  • Back

What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?

The main difficulty is keeping the operating system within the fixed time constraints of a real-time system. If the system
does not complete a task in a certain time frame, it may cause a breakdown of the entire system it is running. Therefore
when writing an operating system for a real-time system, the writer must be sure that his scheduling schemes don’t allow
response time to exceed the time constraint.


Which of the following instructions should be privileged?


a. Set value of timer
b. Read the clock
c. Clear memory


d. Issue a trap instruction
e. Turn off interrupts
f. Modify entries in device-status table g. Switch from user to kernel mode
h. Access I/O device

a. Set value of timer
c. Clear memory


e. Turn off interrupts
f. Modify entries in device-status table g. Switch from user to kernel mode
h. Access I/O device

Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the user job or the operating system itself. Describe two difficulties that you think could arise with such a scheme.

The data required by the operating system (passwords, access
controls, accounting information, and so on) would have to be stored
in or passed through unprotected memory and thus be accessible to
unauthorized users.



Bug fixes, change chip

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems.


a. What are two such problems?
b. Can we ensure the same degree of security in a time-shared machine as we can in a dedicated machine? Explain your answer.

* Stealing or copying a user's files; writing over another program's (belonging to another user or to the OS) area in memory; using system resources (CPU, disk space) without proper accounting; causing the printer to mix output by sending data while some other user's file is printing.
* Probably not, since any protection scheme devised by a human can also be broken -- and the more complex the scheme is, the more difficult it is to be confident of its correct implementation.

How do clustered systems differ from multiprocessor systems? What is required for two machines belonging to a cluster to cooperate to provide a highly available service?

Clustered systems are typically constructed by combining multiple
computers into a single system to perform a computational task distributed
across the cluster. Multiprocessor systems on the other hand could be a single
physical entity comprising of multiple CPUs. A clustered system is less tightly
coupled than a multiprocessor system.
Clustered systems communicate using messages, while processors in a
multiprocessor system could communicate using shared memory. In order for
twomachines to provide a highly available service, the state on the two
machines should be replicated and should be consistently updated. When one
of the machines fail, the other could then take‐over the functionality of the
ailed machine.

What is the purpose of interrupts? What are the differences between an interrupt and a trap? Can traps be generated intentionally by a user program? If so, for what purpose?

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.

Direct Memory Access is used for high-speed I/O devices in order to avoid increasing the CPU's execution load.


a. How does the CPU interface with the device to coordinate the transfer?
b. How does the CPU know when the memory operation is complete? c. The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the user programs? If so, describe what forms of interference are caused.

a. All devices have special hardware controllers. Normally, the OS
has device drivers (which are kernel programs) that communicate with the controllers.
The device drivers have registers, counters and buffers to store arguments and results.
Normally, these drivers sits in a tight loop to see the I/O through. But these would
tie up the CPU during the I/O. With DMA, The CPU first loads them, and then the
device controller takes over.
b. The device controller sends an interrupt to the CPU.
c. You might say there is no interference with user programs, provided you discount
interrupts. The DMA controller sends an interrupt when it is done, and this can cause
a user process to be suspended.


Some computer systems do not provide a privileged mode of operation in hardware. Is it possible to construct a secure operating system for these computer systems? Give arguments both that it is and that it is not possible.

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, Java, 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
ll object code is compiler‐produced. The compiler would generate (either in‐
ine or by function calls) the protection checks that the hardware is missing. The code would be ridiculously complex.

Give two reasons why caches are useful. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device?

Caches are useful when two or more components need to exchange
data, and the components perform transfers at differing speeds. Caches solve
the transfer problem by providing a buffer of intermediate speed between the
components. If the fast device finds the data it needs in the cache, it need not
wait for the slower device. The data in the cache must be kept consistent with
the data in the components. If a component has a data value change, and the
datum is also in the cache, the cache must also be updated. This is especially a
problem on multiprocessor systems where more than one process may be
accessing a datum. A component may be eliminated by an equal‐sized cache,
but only if: (a) the cache and the component have equivalent state‐saving
capacity (that is, if the component retains its data when electricity is removed,
he cache must retain data as well), and (b) the cache is affordable, because
aster storage tends to be more expensive.

Discuss, with examples, how the problem of maintaining coherence of cached data manifests itself in the following processing environments:


a. Single processor system


b. Multiprocessor system


c. Distributed system

In single-processor systems, the memory needs to be updated
when a processor issues updates to cached values. These updates can be
performed immediately or in a lazy manner.


In a multiprocessor system,
different processors might be caching the same memory location in its
local caches. When updates are made, the other cached locations need to
be invalidated or updated.


In distributed systems, consistency of cached
memory values is not an issue. However, consistency problems might
arise when a client caches file data.

Describe a mechanism for enforcing memory protection in order to prevent a program from modifying the memory associates with other programs.

The processor could keep track of what locations are associated with each process and limit access to locations that are outside of a program’s extent. Information regarding the extent of a program’s memory could be maintained by using base and limits registers and by performing a check for every memory access.

Identify several advantages and disadvantages of open-source operating systems. Include the types of people who would find each aspect to be an advantage or a disadvantage.

Open source operating systems have the advantages of having many people working on them, many people debugging them, ease of access and distribution, and rapid update cycles. Further, for students and programmers, there is certainly an advantage to being able to view and modify the source code. Typically open source operating systems are free for some forms of use, usually just requiring payment for support
services. Commercial operating system companies usually do not like the competition that open source operating systems bring because these features are difficult to compete against. Some open source operating
systems do not offer paid support programs. Some companies avoid open source projects because they need paid support, so that they have some entity to hold accountable if there is a problem or they need help fixing an issue. Finally, some complain that a lack of discipline in the coding of open source operating systems
means that backward compatibility is lacking making upgrades difficult, and that the frequent release cycle exacerbates these issues by forcing users to upgrade frequently.