and answers Graded A+
What is an Operating System? - answersThe layer of software that manages a
computer's resources for its users and their applications.
Processor (CPU) - answersexecutes instructions
Memory - answersholds addressable bytes
I/O Devices - answersprovides extra features and connectivity, Configured and
accessed via device registers
What are interconnects? - answerstransfers data between components
What are the hardware components of a computer? - answersThe hardware
components of a computer include the CPU processor, memory, I/O devices, and
interconnects.
What are the roles of an OS? - answersreferee, illusionist, and glue.
Referee - answersManage (scarce) Resource Sharing
- resource allocation
- Isolation
- Communication
Illusionist - answersResource Virtualization
- Mask scarcity of physical resources
- Mask potential hardware failure
Glue - answersSet of common services to applications
- Hardware abstraction
- Filesystem, message passing, memory sharing
What are the design principles of an OS? - answersreliability, security, portability, and
performance.
Performance in design prinicples of an OS - answersOverhead: What the OS adds
compared to a bare-metal execution
, Fairness: Fair distribution of resources
Latency: How long an operation takes
Throughput: How many operations can be executed within a period of time
Predictability: How consistent performance is over time
What are the three major phases in the history of OS? - answershardware was very
expensive (1955-65), when hardware slowly became affordable (1965-80), and when
hardware became dirt cheap (1980-present).
What is a declaration in C programming? - answersA statement in a C program that
makes an identifier known to the program, such as function prototypes, global variables,
type definitions, and macros. It is accessed via the inclusion of headers.
What is a definition in C programming? - answersthe actual code of a function, variable,
or macro in a C program. It is linked at compile-time and dynamically loaded at runtime.
What are the three categories of libc functions? - answers1. No privileged operation to
perform (Regular Functions)
2. Always needs to request privileged operation from OS (System Calls)
3. Sometimes needs to request privileged operation from OS
Give an example of a non-privileged libc function. - answersmemset()
What is a system call (syscall)? - answersA specific CPU instruction that provides a
secure API between user applications and the OS kernel. It is required for privileged
operations.
What are the main categories of system calls? - answers1. Process management
2. Files and directories
3. Pipes
---------------------------
4. Signals
5. Memory management
Definition of a process - answersA program in execution
- Each process is identified by its Process ID (PID)
- Each process runs its own memory space.
- Each process is represented in the OS by a Process Control Block (PCB)
Process Control Block (PCB) - answersA data structure that stores information about a
process, such as its PID, state, CPU register copies for context switching, open files,
and more.
What is the purpose of the fork() system call? - answersused to create a new child
process that is a clone of the parent process.