W1 - Intro & Main Concepts Flashcards

1
Q

How does the OS help application programmers?

A

It hides the complexity and limitations of hardware.

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

In what manner does the OS manage the computer’s resources?

A

In a fair and secure way for users and applications.

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

Two main benefits of an OS for applications

A

Makes them easier to write and run efficiently.

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

Where does the OS sit in relation to applications and hardware?

A

It sits between applications and hardware, acting as an intermediary.

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

What does the OS provide to hide hardware complexity?

A

A standard and abstract interface for applications to use.

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

Name core functions of an OS.

A

Core:
- Memory management
- CPU scheduling
- I/O management

Additional:
- File Management
- Networking

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

Is there a universal list of OS functions?

A

No, there’s no universally agreed definition - different OSes may include different features.

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

What is the kernel in an OS?

A

The central program that runs at all times and has complete control over the system. It is the core of the OS.

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

What are the two types of programs in the OS?

A

System programs (bundled with the OS) and application programs (user-installed)

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

What is the kernel’s relationship with the hardware?

A

The kernel has complete control over everything that occurs in the system. It can access all processor instructions and hardware registers.

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

Which programs operate in kernel mode? Which programs operate in user mode?

A

Privileged (kernel) mode:
- The kernel

User mode:
- All user programs and apps

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

How does dual-mode operation improve system reliability and security?

A

By isolating user programs from the OS (kernel mode), it ensures that user programs cannot directly modify kernel data, protecting the OS from crashes, corruption, or security breaches.

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

What does it mean to isolate user programs from the kernel?

A

It means user programs cannot directly access or modify the kernel’s memory or hardware. They must use controlled interfaces like system calls.

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

How do user programs perform operations that require kernel access?

A

By making system calls, which are controlled requests to the kernel to perform privileged tasks.

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

What is the main difference between the OS and the kernel?

A

The kernel is the core part of the OS that directly manages hardware, while the OS includes everything (kernel + utilities, user interfaces, etc.) that makes the system usable.

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

What are the responsibilities of the kernel?

A

Managing CPU, memory, devices, and system calls, and running in privileged mode.

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

What components are part of the OS but not the kernel?

A

System utilities
- CLI
- File managers
- GUI

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

Can different OSes share the same kernel?

A

Yes. For example, Ubuntu and Fedora are different OSes that both use the Linux kernel.

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

What are the 3 main roles of an Operating System?

A

Referee, Illusionist, and Glue.

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

What does the OS do in its referee role?

A

Manages resources, protects programs/users from each other, prevent apps from crashing each other or the OS, and handles communication.

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

What are some of the OS mechanisms that enable multiple programs to run in such a way that they are protected from one another?

A
  • Address Translation
  • Dual Mode Operation (user <=> kernal mode).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What policy does the following:
- helps enforce protection between programs
- keeps user programs from crashing the OS
- keeps user programs from crashing each other

A

Programs are not allowed to read/write memory of other programs or of the OS.

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

What are two key concepts from the mainframe era of OS history?

A

Multiprogramming and Time Sharing.

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

What shift happened with the rise of personal computers?

A

Focus moved to single-user systems, simplicity, and interactivity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are examples of operating systems used in mainframes?
IBM z/OS, Linux, Solaris.
26
What percentage of servers use Linux and Windows?
2/3 of servers use Linux; 1/3 use Windows.
27
What is the purpose of supercomputers?
To perform extremely high-performance tasks like simulations and data processing.
28
What is a real-time embedded system?
An OS designed for devices requiring immediate, predictable responses (e.g., medical devices, automotive control).
29
What are examples of OS used in wearable devices and the Internet of Things?
AndroidWear, Tizen
30
In the context of operating systems, why mention the evolution of computing devices?
To show that as computing became more personal and widespread, operating systems had to adapt to new types of devices and usage.
31
What is the Internet of Things (IoT) in relation to the historical evolution of computing devices?
IoT represents a phase where individuals have many small, connected computing devices, each often needing its own lightweight operating system.
32
How did the ratio of computers to people change over time?
From one computer per millions of people (mainframes) to thousands of devices per person (IoT era).
33
By how much did CPU speed (MIPS) improve between 1980 and 2014?
About ×2500 times.
34
How did the cost per MIPS change between 1980 and 2014?
It dropped from ~$100,000 per MIPS to ~$0.20 per MIPS.
35
How did memory capacity per dollar change from 1980 to 2014?
It increased from 0.002 MB/$ to 25,000 MB/$ (×12.5 million).
36
What happened to the user-to-computer ratio between 1980 and 2014?
It went from 100 users per computer to many computers per user (IoT era).
37
Why is IoT significant for operating systems?
OSes must now support billions of lightweight, embedded, networked devices.
38
What did Moore’s Law originally state?
The number of transistors on a chip would double every 12 months.
39
How was Moore’s Law revised in 1975?
It was adjusted to doubling roughly every 24 months.
40
Why is Moore’s Law considered "dead" or "almost dead"?
Because chip fabrication has reached physical limitations.
41
What major areas will technology focus on after the end of Moore’s Law?
IoT, connected devices, low-power processors, and applications/OSs for these systems.
42
What are some physical challenges causing the end of Moore’s Law?
Heat dissipation, quantum effects, cost, and complexity of miniaturization.
43
What is the main cause of OS crashes (≈50%)?
Faulty device drivers.
44
What languages are operating systems mostly written in?
C and C++.
45
Approximately how many lines of code are in modern operating systems?
General-purpose OSs (like Linux, Windows): - tens of millions of lines. Embedded/specialized OSs (like for microwaves or IoT): - thousands to tens of thousands of lines.
46
What is an Operating System (OS)?
Software that manages hardware and provides services to applications, making computers easier to use and resources more efficiently managed.
47
How does the OS act as an Illusionist?
It makes each application believe it has the entire machine to itself, with infinite processors, near-infinite memory, reliable storage, and reliable network transport.
48
Why does the OS act as an Illusionist?
To simplify application design and usage by hiding the limits and complexity of real hardware.
49
How does the OS act as "Glue"?
By providing a set of standardized services that allow applications to interact with hardware and other system components. This includes libraries, user interface widgets, authorization mechanisms, and maintaining a consistent "look and feel" across applications.
50
Why does the OS act as "Glue"?
To provide essential building blocks and standardize services for applications, making it easier to develop and run software.
51
Explain how dual-mode operation achieves protection.
Dual-mode operation uses user mode and kernel mode to separate user programs from the OS. User programs run in user mode with restricted access, preventing them from directly modifying kernel data or accessing critical resources. This isolation enhances system reliability and security by ensuring that user data can't interfere with the OS.
52
Process
An instance of a program that is currently running, consisting of its own memory and resources (e.g., I/O). They can exchange data, and they are created by other processes.
53
Multi-programming
Allows multiple programs to run at once, and allows them to run securely in their own separate memory spaces. Processes cannot interfere with other processes or with the OS.
54
Multi-users
Allow multiple users to use the OS at once.
55
On a uniprocessor system, how does the OS create the illusion of multiple processes running simultaneously?
Through context switching, allowing different processes to take turns using the CPU so quickly that it feels simultaneous.
56
What are two benefits of running multiple processes on a uniprocessor?
- Increased throughput (more work gets done) - Timesharing (users feel their programs are running simultaneously)
57
On a multiprocessor (multi-core) system, do you still need context switching?
Yes, because the number of processes is usually much larger than the number of cores, so not all processes can run at once.
58
What is the difference between concurrency and parallelism?
Concurrency: multiple tasks making progress at the same time. Parallelism: splitting one task to run simultaneously across multiple processors.
59
What is the relationship between time sharing and context switching?
Time sharing is the concept of making multiple processes appear to run at once. Context switching is the mechanism the OS uses to switch between processes to achieve time sharing.
60
Why is memory management necessary in an OS?
Because multiple processes share memory, and the OS must fairly allocate, protect, and manage memory between them.
61
What is virtual memory?
An abstraction where each program believes it has access to all available memory, even though physical memory is limited.
62
What is physical memory?
The actual hardware memory (RAM) where programs and data are stored and managed by the OS.
63
How are files organized on an OS?
Files are organized into directories (folders) that form a hierarchical structure.
64
What is the purpose of file ownership and protection (e.g., chmod 644 hello.txt)?
To control who can read, write, or execute a file, enhancing security and management.
65
What are common attributes stored for a file?
Name, size, creation/modification dates, and other metadata (which may differ between OSs).
66
What illusion does an OS create regarding file storage?
It makes it appear that the disk is cleanly organized into files, when in reality it is just raw 0s and 1s.
67
Why does accessing a disk involve latency?
Because disks physically spin, causing delays before data can be read or written.
68
What OS strategies improve I/O throughput?
Keeping the CPU busy while waiting for I/O operations to complete, often by multitasking or scheduling.
69
What role do file formats play in disk management?
File formats define how raw data on the disk is organized into meaningful files.
70
What is an interrupt?
A signal to the processor indicating an event that needs immediate attention.
71
Why are interrupts important in I/O operations?
They allow the CPU to avoid wasting time waiting for slow devices and focus on other tasks until needed.
72
What role does a device driver play in handling interrupts?
It acts as an interface between the OS and the device, allowing the OS to properly respond to the interrupt.
73
Where can interrupts come from?
Interrupts can come from external devices (hardware interrupts), internal CPU events (exceptions), or from software deliberately requesting OS services (software interrupts or traps).
74
What is a Command Line Interface (CLI)?
A CLI allows users to interact with the operating system using text-based commands, offering a precise way to control the system.
75
Name a common Unix-based CLI.
Unix Shell, with examples like Bash (Bourne Again Shell) and Zsh (Z Shell).
76
What is Windows Command Prompt used for?
Basic file management and system administration tasks in Windows operating systems.
77
What is Windows PowerShell?
An advanced command-line interface for Windows that integrates scripting, system administration, and automation capabilities.
78
What are the benefits of using a Command Line Interface (CLI)?
CLIs allow more precise control over the OS, script automation, and can be more efficient for advanced users, though they have a steeper learning curve compared to graphical user interfaces (GUIs).
79
What is a system call?
A programming interface to the OS that allows a program to call the OS using a library of functions.
80
What is POSIX in the context of system calls?
An IEEE standard that defines a minimum set of system calls that any UNIX variant must support.
81
Give an example of a system call for reading a file.
Count = read(fd, buffer, nbytes) fd = file descriptor buffer = place to store results nbytes = number of bytes to read
82
What are the types of system calls?
Process management, file management, device management, information management, and communication.
83
How do programs typically use system calls?
Programs use functions that internally invoke system calls rather than using system calls directly.
84
What is the relationship between shell commands and system calls?
Many shell commands correspond to underlying system calls.
85
What happens during a system call in terms of processor mode?
A system call switches the processor from user mode to kernel mode.