Chapter 3 Operating Systems

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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 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.

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 fundamental goal of a virtual machine architecture is to share the same hardware yet run several different execution environments. Accordingly, from the perspective of an operating system designer, a virtual machine architecture enables a complete protection of the various system resources as each virtual machine is completely isolated from all other virtual machines. From the perspective of a user, a virtual machine architecture enables the concurrent execution of multiple execution environments on a single machine.

What are the main advantages of the microkernel approach to system design?

(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.

What are the three major activities of an operating system in regard to secondary-storage management?

• Free-space management. • Storage allocation. • Disk scheduling.

The experimental Synthesis operating system has an assembler incorporated within the kernel. To optimize system-call performance, the kernel assembles routines within kernel space to minimize the path that 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 the Synthesis 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).

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 that users do not need to write their own programs to solve common problems.

What are the five major activities of an operating system in regard to file management?

The creation and deletion of files • The creation and deletion of directories • The support of primitives for manipulating files and directories • The mapping of files onto secondary storage • The backup of files on stable (nonvolatile) storage media

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 are the three major activities of an operating system in regard to memory management?

a. Keep track of which parts of memory are currently being used and by whom. b. Decide which processes are to be loaded into memory when memory space becomes available. c. Allocate and de-allocate memory space as needed.

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.

a. Program execution. The operating system loads the contents (or sections) of a file into memory and begins its execution. A user level program could not be trusted to properly allocate CPU time. b. I/O operations. Disks, tapes, serial lines, and other devices must be communicated with at a very low level. The user need only specify the device and the operation to perform on it, while the system converts that request into device- or controller-specific commands. User-level programs cannot be trusted to access only devices they should have access to and to access them only when they are otherwise unused. c. File-systemmanipulation. There aremany details in file creation, deletion, allocation, and naming that users should not have to perform. Blocks of disk space are used by files and must be tracked. Deleting a file requires removing the name file information and freeing the allocated blocks. Protections must also be checked to assure proper file access. User programs could neither ensure adherence to protection methods nor be trusted to allocate only free blocks and deallocate blocks on file deletion. d. Communications. Message passing between systems requires messages to be turned into packets of information, sent to the network controller, transmitted across a communications medium, and reassembled by the destination system. Packet ordering and data correction must take place. Again, user programs might not coordinate access to the network device, or they might receive packets destined for other processes. e. Error detection. Error detection occurs at both the hardware and software levels. At the hardware level, all data transfers must be inspected to ensure that data have not been corrupted in transit. All data on media must be checked to be sure they have not changed since they were written to the media. At the software level, media must be checked for data consistency; for instance, whether the number of allocated and unallocated blocks of storage match the total number on the device. There, errors are frequently process-independent (for instance, the corruption of data on a disk), so there must be a global program (the operating system) that handles all types of errors. Also, by having errors processed by the operating system, processes need not contain code to catch and correct all the errors possible on a system.

What are the five major activities of an operating system in regard to process management?

a. The creation and deletion of both user and system processes b. The suspension and resumption of processes c. The provision of mechanisms for process synchronization d. The provision of mechanisms for process communication e. The provision of mechanisms for deadlock handling


Kaugnay na mga set ng pag-aaral

Chapter 52: Assessment and Management of Patients with Endocrine Disorders

View Set

EESC Ch. 24 Sun, Wind and Water energy

View Set

Pharmacology: Respiratory Medications

View Set

how to help someone having a seizure

View Set

Ch 8: Marketing Research: From Customer Insights to Actions

View Set