Chapter 2 - Quiz
__ is/are not a technique for passing parameters from an application to a system call.
Cache memory
__ allow operating system services to be loaded dynamically
Modules
The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX?
fork()
Microkernels use __ for communication
message passing
A microkernel is a kernel __
that is stripped of all nonessential components
Describe three general methods used to pass parameters to the operating system during system calls.
The simplest approach is to pass the parameters in registers. In some cases, there may be more parameters than registers. In these cases, the parameters are generally stored in a block, or table, of memory, and the address of the block is passed as a parameter in a register. Parameters can also be placed, or pushed, onto the stack by the program and popped off the stack by the operating system.
Describe the relationship between an API, the system-call interface, and the operating system.
The system-call interface of a programming language serves as a link to system calls made available by the operating system. This interface intercepts function calls in the API and invokes the necessary system call within the operating system. Thus, most of the details of the operating-system interface are hidden from the programmer by the API and are managed by the run-time support library.
Application programmers typically use an API rather than directory invoking system calls
True
In general, Windows system calls have longer, more descriptive names, and UNIX system calls use shorter, less descriptive names
True
KDE and GNOME desktops are available under open-source licenses.
True
Mac OS X is a hybrid system consisting of both the Mach microkernel and BSD UNIX
True
Many operating systems merge I/O devices and files into a combined file because of the similarity of system calls for each
True
Which of the following statements is incorrect?
A) An operating system provides an environment for the execution of programs. B) An operating system manages system resources. -- C) Operating systems provide both command line as well as graphical user interfaces. D) Operating systems must provide both protection and security.
The close() system call in UNIX is used to close a file. What is the equivalent system call in Windows?
CloseHandle()
An initial bootstrap program is in the form of random-access memory (RAM)
False
System calls can be run in either user mode or kernel mode
False
iOS is open source, Android is closed source
False
What are the advantages and disadvantages of using a microkernel approach?
One benefit of the microkernel approach is ease of extending the operating system. All new services are added to user space and consequently do not require modification of the kernel. The microkernel also provides more security and reliability, since most services are running as user - rather than kernel - processes. Unfortunately, microkernels can suffer from performance decreases due to increases system function overhead.
Describe how Mac OS X is considered a hybrid system.
Primarily because the kernel environment is a blend of the Mach microkernel and BSD UNIX (which is closer to a monolithic kernel)
The __ provides a portion of the system call interface for UNIX and Linux
Standard C Library
__ provide(s) an interface to the services provided by an operating system.
System calls
Explain why a modular kernel may be the best of the current operating system design techniques.
The modular approach combines the benefits of both the layered and microkernel design techniques. In a modular design, the kernel needs only to have the capability to perform the required functions and know how to communicate between modules. However, if more functionality is required in the kernel, then the user can dynamically load modules into the kernel. The kernel can have sections with well-defined, protected interfaces, a desirable property found in layered systems. More flexibility can be achieved by allowing the modules to communicate with one another.
A __ is an example of a systems program
command interpreter
If a program terminates abnormally, a dump of memory may be examined by a __ to determine the cause of the problem.
debugger
Policy
determines what will be done
A message-passing model is __
easier to implement than a shared memory model for inter-computer communication
__ is a mobile operating system designed for the iPhone and iPad
iOS
Android runs Java programs __
in the Dalvik virtual machine
The Windows CreateFile() system call is used to create a file. What is the equivalent system call in UNIX?
open()
A boot block __
typically only knows the location and length of the rest of the bootstrap program
To the SYSGEN program of an operating system, the least useful piece of information is __
which applications to install
Describe how Android uses a unique virtual machine for running Java programs.
The Dalvik virtual machine is designed specifically for Android and has been optimized for mobile devices with limited memory and CPU processing capabilities
There are two different ways that commands can be processed by a command interpreter. One way is to allow command interpreter to contain the code needed to execute the command. The other way is to implement the commands through system programs. Compare and contrast the two approaches.
In the first approach, upon the user issuing a command, the interpreter jumps to the appropriate section of code, and returns control back to the user. In the second approach, the interpreter loads the appropriate program into memory along with the appropriate arguments. The advantage of the first method is speed and overall simplicity. The disadvantage to this techniques is that new commands require rewriting the interpreter program which, after a number of modifications, may get complicated, messy, or too large. The advantage to the second method is that new commands can be added without altering the command interpreter. The disadvantage is reduced speed and the clumsiness of passing parameters from the interpreter to the system program.
Describe some requirements, or goals, when designing an operating system.
Requirements can be divided into user and system goals. Users desire a system that is convenient to use, easy, to learn, reliable, safe, and fast. System goals are defined by those people who must design, create, maintain, and operate the system. The system should be easy to design, implement, and maintain; it should be flexible, reliable, error-free, and efficient
__ is not one of the major categories of system calls.
Security
What are the advantages of using a higher-level language to implement an operating system?
The code can be written faster, is more compact, and is easier to understand and debug. In addition, improvement in compiler technology will generated code for the entire operating system by simple recompilation. Finally, an operating system is far easier to port - to move to some other hardware - if it is written in a higher-level language
The major difficulty is designing a layered operating system approach is __
appropriately defining the various layers