Αρχική ΑΕΠΠ - Δομές Δεδομένων Λειτουργικά Συστήματα Δίκτυα Υπολογιστών ΙΙ Βάσεις Δεδομένων Παιδαγωγικά - Διδακτική

Εισαγωγικά

Εισαγωγή στα Λ.Σ. Βασικές Δομές Η/Υ Βασικές Δομές Λ.Σ

Διεργασίες

Διεργασίες Χρονοπρογραμματισμός Συγχρονισμός

Αδιέξοδα

Μνήμη

Μονοπρογραμματισμός Εναλλαγή Εικονική Μνήμη Κατάτμηση

Είσοδος / Έξοδος

Σύστημα Αρχείων

Διεπαφή Υλοποίηση

 Ιστορικό Πρόσφατες αλλαγές Εκτύπωση Αναζήτηση

Εισαγωγή στα Λειτουργικά Συστήματα

Question

True/False: An operating system can be viewed as “resource allocator” to control various I/O devices and user programs.

Answer

True


Question

What is the fundamental goal of computer systems?

Answer

To execute user programs and solve user problems.


Question

Define operating systems in terms of what they do.

Answer

Their primary goal is convenience of the user; the secondary goal is efficient operation and allocation of all resources.


Question

Describe how the earliest computers were used.

Answer

The programmer himself operated the computer by using switches. He had to sign up for free time.


Question

What problems were involved in these earliest computers?

Answer

The user had to guess the amount of time needed to complete his job, fairly accurately, to avoid wasting machine time, and still allow enough time to complete the job.


Question

What software was added to increase user efficiency?

Answer

Libraries of common functions, device drivers, assembly language, compilers.


Question

What effect did adding I/O devices have on software?

Answer

Creation of software libraries shared by all users, especially for input–output subroutines.


Question

What factors contributed to the setup time for a job? List them.

Answer

  1. Load loader tape.
  2. Load compiler tape.
  3. Load source program.
  4. Execute compiler with output going to tape.
  5. Rewind each tape
  6. If output of compiler was assembly language, load assembler.
  7. Rewind tapes.
  8. Execute assembler with object output to tape.
  9. Rewind tapes.
  10. Load the object program from tape.
  11. Execute the program with output going to paper tape.
  12. Run paper tape output through teletype to get printed copy.

Note: On some systems, the loader had to be reloaded after many of the above steps.


Question

What is a simple batch system?

Answer

A professional computer operator (or machine) groups jobs by characteristics and runs groups of similar jobs together, eff5ciently.


Question

Why use simple batch systems, in preference to early systems?

Answer

Less setup time, and thus less idle time of the computer.


Question

What is “automatic job sequencing”?

Answer

System proceeds from one job to the next without human intervention.


Question

Why have automatic job sequencing?

Answer

To avoid the delays inherent in having the operator changing jobs, and doing things manually.


Question

What is the purpose of the “resident monitor”?

Answer

To perform orderly and eff5cient automatic job sequencing, regardless of errors that might arise.


Question

What were control cards used for?

Answer

To let monitor know what resources are needed for current job, such as compiler, linker, data, etc., when to use them, and with which file; and to tell monitor when it reaches end of job.


Question

List parts of the monitor.

Answer

Control card interpreter, device drivers, loader.


Question

Compare speeds of various I/O devices, in characters/second.

Answer

humans 0.5 to 5 characters/second paper tape 10 characters/second cards 1600 characters/second magnetic tape 160,000 characters/second.


Question

Describe two kinds of off-line operations.

Answer

  1. Cards copied to magnetic tape, which was then mounted on computer; output of computer was dumped to magnetic tape, which was then mounted for output to a printer
  2. Satellite computers read cards onto magnetic tape, which could transfer information to the main computer without remounting.

Question

Describe two approaches to off-line processing.

Answer

  1. Data is read from cards onto magnetic tapes, which are in turn mounted manually on the main system. Printer output from the main system is saved on magnetic tape, which is then mounted manually on a tape reader attached to a line printer.
  2. Data is read from cards onto magnetic tapes. But the tapes are not removed from their drives. Instead, a small computer reads them and sends the information to the main system. Similarly with output. Note: Main difference here is that data was manually exchanged between main computer and off-line system.

Question

What is device independence?

Answer

The feature of systems that allows one input device to be replaced by another without changes in the users’ programs. Similarly with output. Thus, an old model card reader can be replaced with a new model; the old device driver programs are replaced by new ones; user programs need not be changed (though they may need to be relinked). Note: Many students respond that it is the ability to use different devices. This is false. You can write a FORTRAN II program to read cards and print to a line printer, two different devices; yet this does not imply device independence.


Question

What were the advantages of off-line operations?

Answer

  1. Main computer no longer constrained by speed of card reader.
  2. Application programs used logical I/O devices instead of physical I/O devices; programs didn’t have to be rewritten when new I/O devices replaced old ones.

Question

How have disk systems helped solved problems inherent in off-line systems?

Answer

Off-line systems use magnetic tape. The system cannot read data from one end of the tape while the card reader writes data on the other end; it takes about 5 minutes to rewind the tape fully. With disks, it takes only milliseconds to alternate from the portion of the disk used for input and the portion for output.


Question

What is spooling?

Answer

An acronym for “Simultaneous Peripheral Operation On-Line.” It uses the disk as a large buffer for outputting data to line printers and other devices (like microfilm). It can also be used for input, but is generally used for output. Its main use is to prevent two users from alternately printing lines to the line printer on the same page, getting their output completely mixed together. It also helps in reducing idle time and overlapped I/O and CPU.


Question

How do I/O-bound and CPU-bound programs differ?

Answer

In I/O-bound programs, the CPU remains idle much of the time. In CPU-bound programs, the I/O processor remains idle. Note: I/O is never “faster” than CPU.


Question

What is multiprogramming?

Answer

In multiprogramming, several programs are in memory concurrently; the system switches among the programs for ef?cient processing, and minimal idle time. Note: Many students claim multiprogramming “always” keeps CPU and I/O devices busy; this is false; what is the computer to do at 3 AM Sunday morning, when there’s no job to run?


Question

Define batch systems in terms of interaction.

Answer

They are essentially devoid of interaction between user and program. All problems must be anticipated, and can’t be corrected on-line.


Question

In what ways are batch systems inconvenient for users?

Answer

Users can’t interact with their jobs to fix problems. They must anticipate problems or else debugging could be a mess with machine-language dumps. There may also be long turnaround times.


Question

What is time-sharing?

Answer

Using scheduling and multiprogramming to provide an economical interactive system of two or more users.


Question

What are the main advantages of a time-share system?

Answer

Interaction with computer while program is running, short response times (usually less than 10 seconds).


Question

How is time-sharing usually implemented?

Answer

Each user is given a brief time-slice for her job, in round-robin fashion. Her job continues until the time-slice ends. Then her job stops, until it is her turn again.


Question

How do MULTICS and UNIX differ?

Answer

  • MULTICS was a time-sharing system created on a large mainframe GE computer (since then taken over by Honeywell), by GE, by Bell Labs, and by faculty at MIT. It was very flexible, and oriented toward programmers.
  • UNIX was inspired by MULTICS; but it was designed by Ritchie and Thompson in 1974 at Bell Labs for use on minicomputers, like the PDP-11. It was designed for program development, using a device-independent file system.

Question

What is a multiprocessor system?

Answer

A system with two or more CPUs.


Question

What is a master/slave processor system?

Answer

A master computer controls the actions of various slave computers.


Question

What is a real-time system?

Answer

A system used to control a dedicated application.


Question

How does a real-time system differ from time-share?

Answer

In time-sharing, fast response is desirable, but not required. In real-time systems, processing must be completed within certain time constraints appropriate for the system.


Question

List several examples of real-time systems.

Answer

  • Control of a nuclear reactor, to prevent chain reaction.
  • Control of a space ship, to avoid collision with meteors.
  • Control of manufacturing equipment, such as lathes, canners, etc.
  • Detecting patients’ conditions in Intensive Care Units in hospitals.
  • Collecting data on cosmic rays in physics research.

Question

What are the three main purposes of an operating system?

Answer

There are several possible purposes of an operating system:

  1. To provide an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner.
  2. To allocate the separate resources of the computer as needed to solve the problem given.
  3. The allocation process should be as fair and efficient as possible. As a control program it serves two major functions:
    • supervision of the execution of user programs to prevent errors and improper use of the computer, and
    • management of the operation and control of I/O devices.

Question

List the four steps that are necessary to run a program on a completely dedicated machine.

Answer

  1. Reserve machine time.
  2. Manually load program into memory
  3. Load starting address and begin execution
  4. Monitor and control execution of program from console.

Question

An extreme method of spooling, known as staging a tape, is to read the entire contents of a magnetic tape onto disk before using it. Discuss the main advantage of such a scheme.

Answer

No I/O is needed while the data is being processed, so staging is more simple than spooling. All of the data are on-line before they are needed so a process can run at full speed. The disadvantage is that more time is spent, before the process starts, in loading the data, and more disk space is consumed in storing the entire tape contents.


Question

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

  1. What are two such problems?
  2. Can we ensure the same degree of security in a time-shared machine as we have in a dedicated machine?

Explain your answer.

Answer

  1. Stealing or copying one’s programs or data; using system resources (CPU, memory, disk space, peripherals) without proper accounting.
  2. Probably not, since any protection scheme devised by man can inevitably be broken by him, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation.

Question

What is the main advantage of multiprogramming?

Answer

Multiprogramming makes efficient use of the CPU by overlapping the demands for the CPU and its I/O devices from various users. It attempts to increase CPU utilization by always having something for the CPU to execute.


Question

What are the main differences between operating systems for mainframe computers and personal computers?

Answer

Personal computer operating systems are not concerned with fair use, or maximal use, of computer facilities. Instead, they try to optimize the usefulness of the computer for an individual user, usually at the expense of efficiency. Consider how many CPU cycles are used by graphical user interfaces (GUIs). Mainframe operating systems need more complex scheduling and I/O algorithms to keep the various system components busy.


Question

Define the essential properties of the following types of operating systems: Batch Interactive Time sharing Real time Distributed.

Answer

  1. Batch. Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off-line operation, spooling, and multiprogramming. Batch is good for executing large jobs that need little interaction; it can be submitted and picked up later. Answers to Exercises.
  2. Interactive. Composed of many short transactions where the results of the next transaction may be unpredictable. Response time needs to be short (seconds) since the user submits and waits for the result.
  3. Time sharing.Uses CPU scheduling and multiprogramming to provide economical interactive use of a system. The CPU switches rapidly from one user to another. Instead of having a job defined by spooled card images, each program reads its next control card from the terminal, and output is normally printed immediately to the screen.
  4. Real time. Often used in a dedicated application. The system reads information from sensors and must respond within a fixed amount of time to ensure correct performance.
  5. Distributed. Distributes computation among several physical processors. The processors do not share memory or a clock. Instead, each processor has its own local memory. They communicate with each other through various communication lines, such as a high-speed bus or telephone line.

Question

We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to “waste” resources? Why is such a system not really wasteful?

Answer

Single-user systems should maximize use of the system for the user. A GUI might “waste” CPU cycles but it optimizes the user’s interaction with the system.


Question

Under what circumstances would a user be better off using a time-sharing system, rather than a personal computer or single-user workstation?

Answer

When there are few other users, the task is large, and the hardware is fast, timesharing 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 is when there are lots of other users needing 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.


Question

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?

Answer

Symmetric multiprocessing treats all processors as equals, and I/O can be processed on any CPU. Asymmetric multiprocessing has one master CPU and the remainder CPUs are slaves. The master distributes tasks among the slaves, and I/O is usually done by the master only. Multiprocessors can save money, by not duplicating power supplies, housings, and peripherals. They can execute programs more quickly, and can have increased reliability. They are also more complex in both hardware and software than uniprocessor systems.


Question

Why are distributed systems desirable?

Answer

Distributed systems can provide resource sharing, computation speedup, increased reliability, and the ability to communicate with remote sites.


Question

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

Answer

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, it could 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.

Τελευταία ενημέρωση: 26-08-2008 (11:31)

Copyright 2008 - Άρης Φεργάδης