Chapter 2: OS Structures Flashcards

(151 cards)

1
Q

What do operating systems provide to both programs and users?

A

A series of services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

One set of operating-system services provide functions that are helpful to the _____.

A

user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What type of interface do almost all operating systems have?

A

A user interface (UI).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

User interfaces vary between Command-Line (CLI), Graphical (GUI), and _____.

A

touch screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which OS service is responsible for loading a program into memory and running that program?

A

Program execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The OS service for program execution must be able to end execution either normally or _____ (indicating an error).

A

abnormally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A running program may require _____, which can involve a file or an I/O device.

A

I/O operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which OS service allows programs to read, write, create, and delete files and directories?

A

File-system manipulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Besides creating/deleting files, what other tasks are part of file-system manipulation?

A

Searching files,

Listing file information,

Managing permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What OS service enables processes to exchange information, either on the same computer or over a network?

A

Communications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The OS needs to be constantly aware of possible errors as part of which service?

A

Error detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In what three areas might errors occur that an OS needs to detect?

A

In the CPU and memory hardware, in I/O devices, or in a user program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

For each type of error detected, what should the OS do?

A

Take the appropriate action to ensure correct and consistent computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Another set of OS functions exists specifically to ensure the _____ of the system itself.

A

efficient operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What OS service must allocate resources when multiple users or jobs are running concurrently?

A

Resource allocation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are four types of resources that an operating system’s resource allocation service manages?

A

CPU cycles,

main memory,

file storage,

I/O devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the purpose of the OS service known as ‘Accounting’ or ‘Logging’?

A

To keep track of which users use how many and what kinds of computer resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which OS service allows owners of information in a multiuser system to control the use of that information?

A

Protection and security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A Command-Line Interface (CLI) is also known as a _____.

A

command interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the primary function of a CLI (Command-Line Interface)?

A

It fetches a command from the user and executes it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the two types of commands that can be used in a CLI?

A

Built-in commands and external commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What defines a ‘built-in’ command in a CLI?

A

The command is part of the CLI program itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What defines an ‘external’ command in a CLI?

A

The command corresponds to an independent program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

In a Unix/Linux shell, what command checks if another command is built-in or external?

A

The type command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
If `$type cd` returns `cd is a shell builtin`, what does this signify?
That `cd` is a built-in command.
26
If `$type cat` returns `cat is /bin/cat`, what does this signify?
That `cat` is an external command located at `/bin/cat`.
27
Is it possible for a single operating system to have multiple command-line interfaces?
Yes.
28
Name four examples of shells (CLIs) found on Unix/Linux systems.
1. C Shell, 2. Bourne Shell, 3. Bash, 4. Korn shell.
29
Many modern operating systems now include both _____ and _____ interfaces.
CLI (Command-Line Interface), GUI (Graphical User Interface)
30
In Microsoft Windows, the GUI is paired with a CLI known as the _____.
Command Prompt
31
What is the name of the GUI in Apple macOS?
Aqua.
32
In addition to its 'Aqua' GUI, what kind of CLIs does Apple macOS provide?
UNIX shells.
33
On Unix/Linux systems, the CLI (UNIX shells) is standard, while GUI interfaces like CDE, KDE, and GNOME are considered _____.
optional
34
What type of devices require new interfaces where a mouse is not possible or desired?
Touchscreen devices.
35
On a touchscreen interface, actions and selections are based on _____.
gestures
36
How is text entry typically accomplished on a touchscreen interface?
Using a virtual keyboard.
37
What provides the interface to the services made available by an operating system?
System calls.
38
System calls are generally available as functions written in what two programming languages?
C and C++.
39
Certain low-level tasks, such as direct hardware access, may need to be written using _____.
assembly-language instructions
40
Why do most programmers avoid using system calls directly?
Because they are highly detailed and therefore more difficult to use.
41
Instead of direct system calls, what do application developers typically design programs according to?
A high-level Application Programming Interface (API).
42
What does an Application Programming Interface (API) specify for a programmer?
A set of functions that are available to an application programmer.
43
What are the three most common APIs for Windows, POSIX-based systems, and the JVM, respectively?
Win32 API, POSIX API, Java API.
44
The POSIX API is used for POSIX-based systems, which include virtually all versions of which three OS families?
UNIX, Linux, macOS.
45
For which platform is the Java API designed?
The Java virtual machine (JVM).
46
How does a programmer typically access an API's functions?
Via a library of code provided by the operating system.
47
For programs written in the C language, the API library is commonly called the _____.
C standard library (or libc)
48
On Linux, what is the GNU Project's implementation of the C standard library called?
GNU C library (glibc).
49
In addition to the C standard library, what else does the GNU C library (glibc) include?
Additional non-standard extensions.
50
The header files `sys/wait.h` and `sys/types.h` are examples of what in the glibc library?
Non-standard extensions.
51
System calls can be grouped into how many major categories?
Six.
52
What is the first major category of system calls, which includes creating and terminating processes?
Process control.
53
System calls to 'wait for an event' or 'signal an event' fall under which category?
Process control.
54
System calls to allocate and free memory belong to which category?
Process control.
55
What is the second major category of system calls, involving actions like create, delete, open, and close?
File management.
56
System calls to read, write, or reposition within a file belong to which category?
File management.
57
What is the third major category of system calls, which includes requesting and releasing devices?
Device management.
58
System calls to 'logically attach or detach devices' are part of which category?
Device management.
59
What is the fourth major category of system calls, used for getting/setting the time or system data?
Information maintenance.
60
Getting or setting the system date falls under which category of system calls?
Information maintenance.
61
What is the fifth major category of system calls, used for sending and receiving messages?
Communications.
62
System calls to create or delete a communication connection fall under which category?
Communications.
63
What is the sixth major category of system calls, used for managing user access and permissions?
Protection.
64
System calls to get or set file permissions are part of which category?
Protection.
65
What tool compiles source code into object files?
A compiler.
66
Object files are designed to be loaded into any _____ memory location.
physical
67
What tool combines various object codes into a single binary executable file?
A linker.
68
If needed, the linker also incorporates _____ code into the final executable file.
library
69
What component must bring an executable file into memory for it to be executed?
A loader.
70
In a gcc command, what does the linker option `-lm` signify?
It tells the linker (`-l`) to link the math library (`m`).
71
When compiling a C program, you need to include the `-lm` option if your code uses the _____ header.
72
For a simple C program in `main.c` without special libraries, what command generates an executable named `main`?
`gcc –o main main.c`
73
Which library is linked automatically with every C program?
The standard C library.
74
Although the standard C library is linked automatically, _____ are not included automatically.
header files
75
If you intend to use standard input/output features in your C program, you must explicitly include which header file?
`stdio.h`.
76
Are C libraries other than the standard library linked automatically?
No, you must link them to your program yourself.
77
Most modern systems allow a program to _____ link libraries as the program is loaded.
dynamically
78
Windows supports dynamically linked libraries, commonly known by the acronym _____.
DLLs
79
What is the main benefit of dynamically linking libraries?
It avoids linking and loading libraries that may end up not being used.
80
Under dynamic linking, a library is conditionally linked and is loaded only if it is required during _____.
program run time
81
Besides compiled machine code, what important component do executable file formats typically include?
A symbol table with metadata about functions and variables.
82
What is the standard executable and object file format for UNIX/Linux systems?
Executable and Linkable Format (ELF).
83
What is the standard executable file format used by Windows systems?
Portable Executable (PE) format.
84
What is the standard executable file format used by macOS?
Mach-O format.
85
FREE CARD You're starting 2.2
86
What two high-level factors affect the design of an operating system?
The choice of hardware and the type of system (e.g., desktop, mobile, distributed).
87
What are the two main groups of goals that influence operating system design?
User goals and system goals.
88
What are the five listed user goals for an operating system?
It should be convenient to use, easy to learn, reliable, safe, and fast.
89
What are the six listed system goals for an operating system?
It should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient.
90
Early operating systems were typically written in what type of programming language?
Assembly language.
91
Modern operating systems are predominantly written in what type of languages?
Higher-level languages such as C or C++.
92
In modern operating systems, which parts of the kernel might still be written in assembly language and C?
The lowest levels of the kernel.
93
In modern operating systems, which parts might be written in C and C++?
Higher-level routines.
94
What is one advantage of using a higher-level language for OS implementation regarding development speed?
The code can be written at a faster speed.
95
What is an advantage of using a higher-level language for OS implementation regarding code size?
The code is more compact.
96
What is an advantage of using a higher-level language for OS implementation regarding maintenance?
The code is easier to understand and debug.
97
What is a common approach to engineering a large and complex operating system?
To partition the task into small components or modules.
98
In a well-structured OS, each module should be a well-defined portion of the system with carefully defined _____ and _____.
interfaces, functions
99
What are the five different operating system structures discussed in the source material?
1. Monolithic, 2. Layered, 3. Microkernel, 4. Modular, 5. Hybrid structures.
100
What is the simplest structure for organizing an operating system, also described as 'no structure at all'?
The monolithic structure.
101
How does a monolithic structure organize the kernel's functionality?
It places all functionality into a single, static binary file that runs in a single address space.
102
What classic operating system is given as an example of the monolithic structure?
The original UNIX operating system.
103
The original UNIX operating system consists of what two separable parts?
The kernel and system programs.
104
The Linux operating system is based on and structured similarly to what other OS?
UNIX.
105
How do applications on Linux typically communicate with the system call interface to the kernel?
They use the standard C library, known as glibc.
106
Term: glibc
The GNU C Library, which is the GNU Project's implementation of the C standard library used on Linux.
107
In what sense is the Linux kernel considered monolithic?
It runs entirely in kernel mode within a single address space.
108
Although Linux has a monolithic kernel, it also has a _____ design that allows it to be modified during run time.
modular
109
In a layered OS structure, how is the operating system organized?
It is divided into a number of layers (levels), each built on top of lower layers.
110
In a layered OS structure, what constitutes the bottom layer (layer 0)?
The hardware.
111
In a layered OS structure, what constitutes the highest layer (layer N)?
The user interface.
112
What is the fundamental rule of interaction between layers in a layered structure?
Each layer only uses functions and services provided by the layer immediately below it.
113
What problem with the expansion of UNIX led to the development of the microkernel approach?
The kernel became large and difficult to manage.
114
Researchers at which university developed the microkernel approach in the mid-1980s?
Carnegie Mellon University.
115
What was the name of the operating system developed at Carnegie Mellon that pioneered the microkernel approach?
Mach.
116
What is the first step in structuring an OS with the microkernel approach?
Removing all non-essential components from the kernel.
117
What is the second step in the microkernel approach after removing non-essential components from the kernel?
Implementing them as user-level programs that reside in separate address spaces.
118
What is the primary result of applying the microkernel approach to OS design?
A smaller kernel.
119
What are the three minimal services typically provided by a microkernel?
Process management (CPU scheduling), memory management, communication (IPC).
120
What is the main function of a microkernel?
To provide communication between the client program and the various services running in user space.
121
How does a microkernel facilitate communication between different user-level programs and services?
Through message passing.
122
Why can the performance of microkernels suffer compared to monolithic kernels?
Due to increased system overhead.
123
What are two sources of overhead in a microkernel architecture?
Copying messages between services in separate address spaces and switching between processes.
124
What has been the largest impediment to the widespread adoption of microkernel-based operating systems?
The overhead involved in copying messages and switching between processes.
125
What methodology is described as 'perhaps the best current' for operating-system design?
Using loadable kernel modules (LKMs).
126
How does the modular OS structure work?
The kernel has a set of core components and can link in additional services via modules at boot time or during run time.
127
What are some examples of modern operating systems that use a modular structure?
Linux, macOS, Solaris, Windows.
128
How does the modular structure resemble the layered structure?
Each kernel section has defined, protected interfaces.
129
What makes the modular structure more flexible than a layered system?
Any module can call any other module.
130
Term: Hybrid Structure (OS)
An OS structure that combines multiple approaches to address performance, security, and usability issues.
131
Why is Linux considered to have a hybrid structure?
It is monolithic for performance but also modular, allowing new functionality to be added dynamically.
132
The process of starting a computer by loading the kernel is known as _____ the system.
booting
133
What is the first step in the system boot process?
A small piece of code known as the bootstrap program or boot loader locates the OS kernel.
134
What is the second step in the system boot process?
The kernel is loaded into memory and started.
135
What is the third step in the system boot process?
The hardware (like CPU registers and main memory) is initialized.
136
What is the fourth step in the system boot process?
The root file system is mounted.
137
For legacy computers, the boot process is based on what system?
Basic Input/Output System (BIOS).
138
Where was BIOS originally stored in older computer systems?
In a ROM chip on the motherboard.
139
Where is BIOS stored in modern computer systems?
On flash memory on the motherboard.
140
Why is storing BIOS on flash memory an advantage over storing it on a ROM chip?
It can be rewritten without removing the chip from the motherboard.
141
In Stage 1 of a BIOS-based boot, what happens when the computer is powered on?
The small boot loader, BIOS, is executed.
142
In Stage 2 of a BIOS-based boot, what is the primary function of the initial boot loader (BIOS)?
It loads a second boot loader from a fixed disk location called the boot block.
143
In Stage 3 of a typical BIOS-based boot, what is the final task of the bootstrap program?
To locate and execute the OS kernel.
144
For recent computers, the booting process is based on what interface?
Unified Extensible Firmware Interface (UEFI).
145
What is one advantage of UEFI over BIOS regarding boot speed?
UEFI can initialize hardware and start the operating system more quickly.
146
What is an advantage of UEFI over BIOS regarding disk support?
UEFI has better support for larger disks.
147
What is the maximum drive size that BIOS supports?
Up to 2 TB per drive.
148
If you plan to use VirtualBox to install Ubuntu Linux, what is the first step?
Download and install VirtualBox.
149
After installing VirtualBox, what is the next step to prepare for an Ubuntu installation?
Download the Ubuntu ISO image.
150
Once VirtualBox is installed and you have an Ubuntu ISO, what do you instruct VirtualBox to do?
Use the ISO as the bootable medium and boot the virtual machine.
151
What are two alternative companies that provide virtualization software besides VirtualBox?
VMware and Parallels.