SS2023: Exam 2023-06-30 (Handout)¶
Name |
UNIX/Linux Concepts¶
(From Quiz: Linux Basics)
Statement |
True |
False |
---|---|---|
In kernel space there exists the concept of a process |
||
In user space there exists the concept of a process |
||
Interrupts are generally serviced in user space |
||
Interrupts are generally serviced in kernel space |
||
Scheduling of processes is done by the kernel |
||
Address spaces are implemented in user space |
||
A process can own all memory in the system |
||
The kernel is the owner of all memory in the system |
||
All processes share a single address space |
||
Each process in the system has its own address space |
||
An address space is three-dimensional |
||
A process is identified by its process ID |
||
A process is identified by its pthread context number |
||
Processes are arranged in a process hierarchy, starting at process 1 |
||
A process may have multiple parents |
||
Every process has a parent process |
||
Every process except process 1 has a parent process |
||
A timeslice is the amount of time that a process can run until it is suspended in favor of other processes |
||
Fair scheduling ensures that network resources are evenly shared |
||
On a single-CPU machine, no process may enter an infinite loop - or else, the entire machine will come to a halt |
||
Fair scheduling ensures that every process gets its fair share of CPU resources |
||
The scheduler gives processes the illusion that each of them owns the CPU |
||
A context switch happens when one process enters a blocking system call |
Toolchain¶
(From Quiz: Toolchain)
Statement |
True |
False |
---|---|---|
The compiler combines multiple object files together into one executable |
||
The compiler turns a single source file into an object
( |
||
Object files are not executable |
||
Object files are executable |
||
The linker combines multiple object files together into one executable |
||
The linker combines multiple object files together into a static library |
C++¶
(From FH/Moodle Quiz: C++)
Statement |
True |
False |
---|---|---|
When an action is said to lead to undefined behavior, this means that the program will crash |
||
When an action is said to lead to undefined behavior, this means that the program could crash |
||
When an action is said to lead to undefined behavior, this means that the program will continue but will wreak havoc on its data |
||
When an action is said to lead to undefined behavior, this means that the program could continue but could wreak havoc on its data |
||
A variable declared |
||
A variable of type |
||
Class members cannot be declared |
||
|
||
A method declared |
||
Declaring a class constructor |
||
A reference variable can be left uninitialized |
||
A caller that passes a variable to a function/method as a reference must take into account that the variable could be modified |
||
A caller that passes a variable to a function/method as a
|
||
A default constructor initializes an object when no initialization parameters are given |
||
|
||
In a |
||
In a |