1 Flashcards

(37 cards)

1
Q

Q: What are the main elements of a computer system?

A

A: Users (humans and machines), software (application programs, OS, system programs), and hardware (CPU, memory, battery, input/output devices).

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

Q: Why is a mediator needed between hardware and user programs?

A

A: Hardware operates at a very low abstraction level compared to user programs, and a mediator is needed to optimize resource sharing and simplify hardware access.

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

Q: What is the OS kernel?

A

A: The kernel is the one program that always runs in the OS. Everything else is either a system program or an application program.

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

Q: What is the informal definition of an operating system?

A

A: A piece of software that acts as an intermediary between users/applications and hardware, provides abstraction, organizes hardware resource sharing, and maximizes performance.

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

Q: How does the CPU handle I/O operations concurrently?

A

A: The CPU moves data between main memory and device controller buffers, while the device controller performs I/O operations and signals readiness via an interrupt.

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

Q: What is Direct Memory Access (DMA)?

A

A: DMA allows devices to transfer data directly to/from main memory without involving the CPU for each transfer, improving efficiency.

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

Q: What is an interrupt?

A

A: An interrupt is a signal to the CPU from hardware, transferring control to an interrupt service routine. It helps coordinate between the CPU and devices.

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

Q: What is the role of the interrupt vector?

A

A: The interrupt vector contains addresses of all interrupt service routines, directing the CPU to the appropriate handler when an interrupt occurs.

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

Q: What is a trap or exception?

A

A: A trap or exception is a software-generated interrupt caused by either a program error or a system call.

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

Q: What is dual-mode operation in an OS?

A

A: Dual-mode operation uses a mode bit to distinguish between user mode (restricted privileges) and kernel mode (full privileges), protecting the OS and hardware.

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

Q: How does a system call change the mode of operation?

A

A: A system call switches the CPU from user mode to kernel mode, and returning from the call resets it back to user mode.

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

Q: What happens when requested data is not available in system buffers during a read operation?

A

A: The calling process is suspended until the data is available.

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

Q: What happens when a process consumes its allotted CPU time?

A

A: The process is suspended, and the CPU switches to another process.

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

Q: What does the OS file system do when data is already available in system buffers?

A

A: The OS retrieves the data directly from the buffers, bypassing the need for a disk access operation.

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

Q: What is the benefit of abstraction provided by an OS?

A

A: It hides the complexity of hardware architecture from applications, making it easier for programs to interact with hardware.

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

Q: How does the OS optimize the use of hardware resources?

A

A: By organizing resource sharing and managing access efficiently through scheduling and resource allocation.

14
Q

Q: Why are interrupts essential for an OS?

A

A: Interrupts allow the OS to handle asynchronous events, like device readiness or errors, while ensuring efficient CPU utilization.

15
Q

Q: What is stored by the OS when an interrupt occurs?

A

A: The OS saves the CPU state, including registers and the program counter, to resume execution after handling the interrupt.

16
Q

Q: What is a policy in the context of operating systems?

A

A: A policy defines what you want a system to do.

17
Q

Q: What is a mechanism in the context of operating systems?

A

A: A mechanism defines how to achieve the policy.

18
Q

Q: What is the relationship between policies and mechanisms?

A

A: Policies need appropriate mechanisms for their realization.

19
Q

Q: What is virtualization in operating systems?

A

A: Virtualization provides a simple, abstract, logical model of the system by virtualizing hardware.

20
Q

Q: What is transparency in operating systems?

A

A: Transparency hides details with respect to a given issue, simplifying system interaction.

20
Q

Q: What is the main motivation for an operating system?

A

A: To deal with diversity, provide transparency, virtualization, shared functionality, and concurrency.

21
Q: How does layering and virtualization work in operating systems?
A: An OS layer with a well-defined API creates a virtual machine that hides hardware details and provides an abstract interface for programmers.
22
Q: What is the role of virtualization in modern systems?
A: Virtualization supports multiple OSs running on a single physical system by implementing a runtime virtualization layer.
23
Q: What are some tasks of an operating system?
A: Hiding inner workings, abstracting memory hierarchy, managing resources, providing APIs, and enabling concurrency.
24
Q: Why do we use APIs instead of direct system calls?
A: APIs are easier to use, more frequent, and portable across systems supporting the API.
25
Q: What are the types of system calls?
A: Process management, file management, memory management, device management, communications, and miscellaneous.
26
Q: What is the operating system's task regarding concurrency?
A: To realize concurrency transparency (virtualization) and manage and protect resource usage between tasks and users.
27
Q: What are extra-functional requirements of an OS?
A: Efficiency: Sacrificed efficiency for abstraction should be reasonable. Extensibility: Support adding application-specific functionality. Scalability: Support diverse environments and machines. Dependability: Robust, correct, safe, and secure.
27
Q: What is the main purpose of standardizing APIs?
A: To define a virtual machine and give a unified machine view to applications.
28
Q: What are the requirements for a real-time operating system?
A: Predictability. Support for real-time control. Stringent dependability.
29
Q: What are the requirements for an embedded operating system?
A: Small footprint. Low system requirements. Stringent dependability.
30
Q: Why does an OS abstract hardware details?
A: To hide the complexity of hardware architecture and simplify programming.
31
Q: What does OS scalability refer to?
A: The ability to support a wide range of environments, functionalities, and machines.
32
Q: What does OS dependability refer to?
A: The robustness, correctness, safety, and security of the operating system.