EX chapter 2 Flashcards

1
Q
1.  A \_\_\_\_\_ is an example of a systems program.
A)  command interpreter
B)  Web browser
C)  text formatter
D)  database system
A

Ans: A
Feedback: 2.2.1
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
2.  If a program terminates abnormally, a dump of memory may be examined by a \_\_\_\_ to determine the cause of the problem.
A)  module
B)  debugger
C)  shell
D)  control card
A

Ans: B
Feedback: 2.4.1
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. A message-passing model is ____.
    A) easier to implement than a shared memory model for intercomputer communication
    B) faster than the shared memory model
    C) a network protocol, and does not apply to operating systems
    D) only useful for small simple operating systems
A

Ans: A
Feedback: 2.4.5
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
4.  Policy \_\_\_\_.
A)  determines how to do something
B)  determines what will be done
C)  is not likely to change across places
D)  is not likely to change over time
A

Ans: B
Feedback: 2.6.2
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. The major difficulty in designing a layered operating system approach is ____.
    A) appropriately defining the various layers
    B) making sure that each layer hides certain data structures, hardware, and operations from higher-level layers
    C) debugging a particular layer
    D) making sure each layer is easily converted to modules
A

Ans: A
Feedback:: 2.7.2
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. A microkernel is a kernel ____.
    A) containing many components that are optimized to reduce resident memory size
    B) that is compressed before loading in order to reduce its resident memory size
    C) that is compiled to produce the smallest size possible when stored to disk
    D) that is stripped of all nonessential components
A

Ans: D
Feedback: 2.7.3
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. To the SYSGEN program of an operating system, the least useful piece of information is _____.
    A) the CPU being used
    B) amount of memory available
    C) what applications to install
    D) operating-system options such as buffer sizes or CPU scheduling algorithms
A

Ans: C
Feedback: 2.9
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. A boot block ____.
    A) typically only knows the location and length of the rest of the bootstrap program
    B) typically is sophisticated enough to load the operating system and begin its execution
    C) is composed of multiple disk blocks
    D) is composed of multiple disk cylinders
A

Ans: A
Feedback: 2.10
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
9. \_\_\_\_\_ provide(s) an interface to the services provided by an operating system.
A) Shared memory
B) System calls
C) Simulators
D) Communication
A

Ans: B
Feedback: 2.3
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
10. \_\_\_\_\_ is not one of the major categories of system calls.
A) Process control
B) Communications
C) Protection
D) Security
A

Ans: D
Feedback: 2.4
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
11. \_\_\_\_\_ allow operating system services to be loaded dynamically.
A) Virtual machines
B) Modules
C) File systems
D) Graphical user interfaces
A

Ans: B
Feedback: 2.7.4
Difficulty: Medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
12. Microkernels use \_\_\_\_\_ for communication.
A) message passing
B) shared memory
C) system calls
D) virtualization
A

Ans: A
Feedback: 2.7.3
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
13. The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX:
A) NTCreateProcess()
B) process()
C) fork()
D) getpid()
A

Ans: C
Feedback: 2.4.1
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
14. The close() system call in UNIX is used to close a file. What is the equivalent system call in Windows:
A) CloseHandle()
B) close()
C) CloseFile()
D) Exit()
A

Ans: A
Feedback: 2.4.1
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
15. The Windows CreateFile() system call is used to create a file. What is the equivalent system call in UNIX:
A) ioctl()
B) open()
C) fork()
D) createfile()
A

Ans: B
Feedback: 2.4.1
Difficulty: Easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
16. Android runs Java programs \_\_\_\_\_\_\_\_\_\_\_\_\_
A) in the Dalvik virtual machine.
B) natively.
C) in the Java virtual machine.
D) Android does not run Java programs.
A

Ans: A
Feedback: 2.7.5
Difficulty: Medium

17
Q
17. \_\_\_\_\_\_ is a mobile operating system designed for the iPhone and iPad.
A) Mac OS X
B) Android
C) UNIX
D) iOS
A

Ans: D
Feedback: 2.7.5
Difficulty: Medium

18
Q
18. The \_\_\_\_\_\_\_\_ provides a portion of the system call interface for UNIX and Linux.
A) POSIX
B) Java
C) Standard C library
D) Standard API
A

Ans: C
Feedback: 2.4.1
Difficulty: Medium

19
Q
  1. 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.
A

Ans: C
Feedback: 2.1
Difficulty: Easy

20
Q
20. \_\_\_\_\_ is/are not a technique for passing parameters from an application to a system call.
A) Cache memory
B) Registers
C) Stack
D) Special block in memory
A

Ans: A
Feedback: 2.3
Difficulty: Medium

21
Q
  1. There are two different ways that commands can be processed by a command interpreter. One way is to allow the 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.
A

Ans: In the first approach, upon the user issuing a command, the interpreter jumps to the appropriate section of code, executes the command, 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 technique 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.
Feedback: 2.2
Difficulty: Hard

22
Q
  1. Describe the relationship between an API, the system-call interface, and the operating system.
A

Ans: 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.
Feedback: 2.3
Difficulty: Hard

23
Q
  1. Describe three general methods used to pass parameters to the operating system during system calls.
A

Ans: 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.
Feedback: 2.3
Difficulty: Medium

24
Q
  1. What are the advantages of using a higher-level language to implement an operating system?
A

Ans: The code can be written faster, is more compact, and is easier to understand and debug. In addition, improvements in compiler technology will improve the 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.
Feedback: 2.6.3
Difficulty: Medium

25
Q
  1. Describe some requirements, or goals, when designing an operating system.
A

Ans: Requirements can be divided into user and system goals. Users desire a system that is convenient to use, easy to learn, and to use, 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.
Feedback: 2.6.1
Difficulty: Medium

26
Q
  1. What are the advantages and disadvantages of using a microkernel approach?
A

Ans: 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 increased system function overhead.
Feedback: 2.7.3
Difficulty: Medium

27
Q
  1. Explain why a modular kernel may be the best of the current operating system design techniques.
A

Ans: 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.
Feedback: 2.7.4
Difficulty: Hard

28
Q
  1. Describe how Mac OS X is considered a hybrid system.
A

Ans: Primarily because he kernel environment is a blend of the Mach microkernel and BSD UNIX (which is closer to a monolithic kernel.)
Feedback: 2.7.5
Difficulty: Medium

29
Q
  1. Describe how Android uses a unique virtual machine for running Java programs.
A

Ans: The Dalvik virtual machine is designed specifically for Android and has been optimized for mobile devices with limited memory and CPU processing capabilities.
Feedback: 2.7.5
Difficulty: Medium

30
Q
  1. KDE and GNOME desktops are available under open-source licenses.
A

Ans: True
Feedback: 2.2.2
Difficulty: Easy

31
Q
  1. Many operating system merge I/O devices and files into a combined file because of the similarity of system calls for each.
A

Ans: True
Feedback: 2.4.3
Difficulty: Medium

32
Q
  1. An initial bootstrap program is in the form of random-access memory (RAM).
A

Ans: False
Feedback: 2.11
Difficulty: Easy

33
Q
  1. System calls can be run in either user mode or kernel mode.
A

Ans: False
Feedback: 2.3
Difficulty: Easy

34
Q
  1. Application programmers typically use an API rather than directory invoking system calls.
A

Ans: True
Feedback: 2.3
Difficulty: Easy

35
Q
  1. In general, Windows system calls have longer, more descriptive names and UNIX system calls use shorter, less descriptive names.
A

Ans: True
Feedback: 2.4
Difficulty: Easy

36
Q
  1. Mac OS X is a hybrid system consisting of both the Mach microkernel and BSD UNIX.
A

Ans: True
Feedback: 2.7.5
Difficulty: Medium

37
Q
  1. iOS is open source, Android is closed source.
A

Ans: False
Feedback: 2.7.5
Difficulty: Medium