Αρχική ΑΕΠΠ - Δομές Δεδομένων Λειτουργικά Συστήματα Δίκτυα Υπολογιστών ΙΙ Βάσεις Δεδομένων Παιδαγωγικά - Διδακτική
Εισαγωγή στα Λ.Σ. Βασικές Δομές Η/Υ Βασικές Δομές Λ.Σ
Διεργασίες Χρονοπρογραμματισμός Συγχρονισμός
Μονοπρογραμματισμός Εναλλαγή Εικονική Μνήμη Κατάτμηση
This section is concerned with the operating system interfaces that users (or at least programmers) actually see: control cards and system calls. The treatment is somewhat vague since more detail requires picking a specific system to discuss. This chapter is best supplemented with exactly this detail for the specific system the students have at hand. They should study the control card (or command) semantics and syntax; ideally they should study the system calls and write some programs making system calls. This chapter also ties together several important concepts including layered design, virtual machines, system design and implementation, system generation, and the policy/mechanism difference.
List system service functions provided for the convenience of the programmer. Tell what each does.
Program execution loads and executes programs, allows debugging I/O operations does all read and write operations File system management allows you to create, delete, open files, etc. Communications allows processes to communicate with each other Error detection CPU, hardware, instructions, device errors
List system service functions provided for efficient operation of the system.
How do systems-programming languages differ from other high-level languages?
Systems-programming languages allow system calls directly; they have provisions for accessing hardware components, such as registers. Other high-level languages don’t.
List system calls used in a typical file-processing PL/I program.
Get, put, signal(finish), open, close. In more detail:
Describe three methods for passing parameters needed by system calls.
List five or more functions to control processes and jobs.
List eight or more functions for file manipulation.
Create, delete, open, close, read, write, and reposition files, get/set file attributes.
List debugging aids for programmers.
What is a time profile?
Shows amount of time executed by each instruction or block of instructions.
List categories of systems programs.
What is a command interpreter? By what other names is it known?
Program that interprets the commands you type in at terminal, or enter through a batch file; gets and executes next user-specified command. Names: control card interpreter, command line interpreter, console command processor, shell.
How can command interpreters be implemented?
What are the five major activities of an operating system in regard to process management?
What are the three major activities of an operating system in regard to memory management?
What are the three major activities of an operating system in regard to secondary-storage management?
What are the five major activities of an operating system in regard to file management?
What is the purpose of the command interpreter? Why is it usually separate from the kernel?
It reads commands from the user or from a file of commands and executes them, usually by turning them into one or more system calls. It is usually not part of the kernel since the command interpreter is subject to changes.
List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs to provide these services.
What is the purpose of system calls?
System calls allow user-level processes to request services of the operating system.
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 so users do not need to write their own programs to solve common problems.
What is the main advantage of the layered approach to system design?
As in all cases of modular design, designing an operating system in a modular way has several advantages. The system is easier to debug and modify because changes affect only limited sections of the system rather than touching all sections of the operating system. Information is kept only where it is needed and is accessible only within a defined and restricted area, so any bugs affecting that data must be limited to a specific module or layer.
What is the main advantage for an operating-system designer of using a virtual-machine architecture? What is the main advantage for a user?
The system is easy to debug, and security problems are easy to solve. Virtual machines also provide a good platform for operating system research since many different operating systems may run on one physical system.
Why is the separation of mechanism and policy a desirable property?
Mechanism and policy must be separate to ensure that systems are easy to modify. No two system installations are the same, so each installation may want to tune the operating system to suit its needs. With mechanism and policy separate, the policy may be changed at will while the mechanism stays unchanged. This arrangement provides a more flexible system.
Consider the experimental Synthesis operating system, which has an assembler incorporated within the kernel. To optimize system-call performance, the kernel assembles routines within kernel space to minimize the path the system call must take through the kernel. This approach is the antithesis of the layered approach, in which the path through the kernel is extended so that building the operating system is made easier. Discuss the pros and cons of this approach to kernel design and to system-performance optimization.
Synthesis is impressive due to the performance it achieves through on-the-fly compilation. Unfortunately, it is difficult to debug problems within the kernel due to the fluidity of the code. Also, such compilation is system specific, making Synthesis difficult to port (a new compiler must be written for each architecture).
Copyright 2008 - Άρης Φεργάδης