Fundamentals Of Operating System Flashcards

1
Q

What is an operating system?

A

An operating system is a set of programs that control how a computer system works, especially how memory is used and how different programs work together.

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

What are some common examples of operating systems?

A

Common examples of operating systems include Windows, Linux, and macOS.

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

How does Cambridge University Press (2013) define an operating system?

A

Cambridge University Press (2013) defines an operating system as “a set of programs that control the way a computer system works, especially how its memory is used and how different programs work together.”

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

What is the Cambridge University Press (2009) definition of an operating system?

A

Cambridge University Press (2009) defines an operating system as “the set of programs that a computer uses to operate, store files, and communicate with devices and other computers.”

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

What is the Cambridge University Press (2011) definition of an operating system?

A

Cambridge University Press (2011) defines an operating system as “a program that controls the way a computer works, and that allows applications (programs for particular purposes) to work on it.”

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

How does the International Organization for Standardization (2015) describe an operating system?

A

The International Organization for Standardization (2015) describes an operating system as “software that controls the execution of programs and that may provide services such as resource allocation, scheduling, input-output control, and data management.”

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

What is the Merriam-Webster definition of an operating system?

A

Merriam-Webster defines an operating system as “software that controls the operation of a computer and directs the processing of programs (as by assigning storage space in memory and controlling input and output functions).”

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

What keywords can be used to categorize the tasks of an operating system?

A

Keywords include supporting computer operating nodes, organizing program management, providing a user interface, managing resources, monitoring the system, and ensuring system security.

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

What source does the course on operating systems follow for its structure?

A

The course follows the standards outlined in Modern Operating Systems by Andrew S. Tanenbaum (2015).

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

According to Tanenbaum (2015), what are the central tasks of an operating system?

A

The central tasks of an operating system, according to Tanenbaum (2015), are “to provide user programs with a better, simpler, cleaner model of the computer and to handle managing hardware resources.”

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

What role does hardware abstraction play in the function of an operating system?

A

Hardware abstraction allows the operating system to provide a simplified model of the computer, making it easier for user programs to interact with the hardware without managing its complexity directly.

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

What is the core building block of any computer system?

A

The core building block of any computer system is the processor or central processing unit (CPU).

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

What is the von Neumann cycle?

A

The von Neumann cycle is the continuous process by which the CPU fetches, decodes, and executes instructions until the computer is shut down.

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

Who developed the concepts behind the von Neumann architecture?

A

The von Neumann architecture was developed by Hungarian-American scientist John von Neumann in 1945.

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

What are the key elements of the von Neumann architecture?

A

The key elements are the central processing unit (CPU), main memory, input/output components, and the communication system.

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

What are the two main units of the CPU in the von Neumann architecture?

A

The CPU consists of the control unit and the arithmetic logic unit (ALU).

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

What is the role of the control unit in the CPU?

A

The control unit is responsible for executing the program, fetching instructions from memory, decoding them, and coordinating their execution.

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

What does the arithmetic logic unit (ALU) do?

A

The ALU performs arithmetic and logical calculations within the CPU.

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

What is the function of registers within the CPU?

A

Registers are fast buffers within the CPU that store the results of calculations temporarily for quick access.

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

What is the defining feature of the main memory in the von Neumann architecture?

A

The main memory features random access memory (RAM), allowing the CPU to read and write data and instructions in any order.

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

What role do input/output components play in the von Neumann architecture?

A

Input/output components handle communication between the system and the environment, such as with users or storage devices.

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

How does the communication system in the von Neumann architecture work?

A

The communication system uses bus systems (e.g., address bus, data bus) to facilitate communication between the CPU, main memory, and other components.

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

What are the five steps of the von Neumann cycle?

A

The five steps are: Fetch instruction, Decode instruction, Fetch operand, Execute instruction, and Store result.

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

What happens during the fetch instruction step in the von Neumann cycle?

A

The CPU loads a program instruction from the main memory for processing.

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

What is machine language, and why is it important in the decode instruction step?

A

Machine language is the numerical format in which instructions are stored in memory, and it is specific to each processor family.

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

What happens during the execute instruction step of the von Neumann cycle?

A

The arithmetic logic unit (ALU) performs the actual calculation, such as adding two numbers or jumping to another address.

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

What is instruction pipelining, and how does it improve CPU performance?

A

Instruction pipelining allows the CPU to process multiple instructions in overlapping stages, completing one instruction per clock cycle.

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

What is vector processing in modern CPUs?

A

Vector processing allows modern CPUs to perform calculations across a set of operands simultaneously, commonly used in applications like computer games and scientific simulations.

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

What are caches, and why are they important in modern CPUs?

A

Caches are layers of fast memory between the CPU and slower main memory, allowing the CPU to process data more quickly without being slowed down by memory access times.

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

What is a multicore system, and how does it differ from earlier CPU designs?

A

A multicore system consists of multiple logical CPUs (cores) on a single processor chip, allowing for parallel processing within a single physical processor.

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

What role does the operating system play in the von Neumann architecture?

A

The operating system manages and controls the execution of applications and facilitates the interaction between software and hardware in a von Neumann architecture.

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

What is the core of an operating system called, and in what mode is it executed?

A

The core of an operating system is called the kernel, and it is executed in a privileged mode (kernel mode).

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

What happens if an application tries to call privileged machine instructions directly?

A

An error occurs, which is handled by the operating system.

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

What is the distinction between user mode and kernel mode?

A

User mode restricts applications from directly accessing hardware, while kernel mode allows the operating system to execute privileged instructions to manage hardware safely.

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

How do applications interact with hardware if direct access is prohibited?

A

Applications interact with hardware through the operating system, using system calls encapsulated in system libraries.

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

What happens during an interrupt or exception in a CPU?

A

The program counter is loaded with a new address (usually in the kernel), and the CPU switches to kernel mode to handle the interrupt or exception.

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

What is the role of the interrupt controller in the CPU?

A

The interrupt controller manages and processes exceptions or interruptions by switching to the appropriate address in the kernel and saving the old execution thread.

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

How does the operating system support different operating modes?

A

The operating system supports modes like real-time operation, multi-user operation, batch processing, and virtualization to meet various computing needs.

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

What is the role of the operating system in managing program execution?

A

The operating system ensures that when one program finishes, another is executed, managing multiple programs and ensuring smooth transitions between them.

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

What kind of user interfaces do modern operating systems typically provide?

A

Modern operating systems provide graphical user interfaces (GUIs) for user interaction and command-line interfaces (CLIs) for administrators.

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

What is a device driver, and why must it be executed in kernel mode?

A

A device driver is a set of program code that controls communication between the computer and attached hardware. It must be executed in kernel mode to access the hardware directly.

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

What are the responsibilities of an operating system in user, device, and resource management?

A

The operating system manages user accounts, device access through drivers, and core resources like the CPU and memory, ensuring secure and efficient operation.

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

How does the operating system ensure system security?

A

The operating system protects against unauthorized access, prevents system crashes from program errors, and manages resources efficiently in multi-user environments.

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

What role does system monitoring play in an operating system?

A

System monitoring allows the operating system to detect and handle critical issues, ensuring system stability and logging data for administrative troubleshooting.

45
Q

What are system calls, and what role do they play in hardware abstraction?

A

System calls are special function calls provided by the operating system that allow applications to interact with hardware through standardized interfaces without accessing hardware directly.

46
Q

What is the difference between a program and a process in the context of an operating system?

A

A program is a sequence of machine instructions, while a process is a program in execution.

47
Q

What role does the process control block (PCB) play in managing processes?

A

The PCB stores the status of each process, including the program counter and other execution-related information, enabling the operating system to manage multiple processes.

48
Q

How does an operating system manage multiple processes when there are more processes than CPU cores?

A

The operating system switches between processes based on their needs, updating the program counter and selecting the next process for execution.

49
Q

What are the three main process states?

A

The three main process states are: Active, Ready, and Blocked.

50
Q

What happens when a process is blocked?

A

The process is paused and taken off the CPU while waiting for input/output operations to complete. Once the needed data or resources are available, it transitions from ‘blocked’ to ‘ready.’

51
Q

What is cooperative multitasking?

A

Cooperative multitasking relies on processes to make system calls to allow other processes to use the CPU, but non-cooperative processes can monopolize the CPU if they don’t make system calls.

52
Q

What is preemptive multitasking, and how does it work?

A

Preemptive multitasking uses hardware interrupts (like a time slice or ‘hardware alarm clock’) to allow the operating system to regain control of the CPU, preventing processes from monopolizing it.

53
Q

What is a time slice in preemptive multitasking?

A

A time slice is the maximum amount of time a process can use the CPU before an interrupt occurs, allowing the operating system to perform a process switch.

54
Q

What happens if a time slice expires without a system call?

A

The operating system preempts the process, saves its state, and can switch to another process or continue with the current process, depending on the queue and priorities.

55
Q

How can a program utilize multiple CPUs or cores simultaneously?

A

A program can be designed to use multiple CPUs or cores through threading, where different threads of execution within the same process can run on different processors.

56
Q

What are threads, and how do they relate to processes?

A

Threads are smaller units of execution within a process, allowing tasks to be run concurrently. Multiple threads share the same process address space.

57
Q

What is the difference between user-level and kernel-level threads?

A

User-level threads are managed at the application level, without the operating system’s knowledge. Kernel-level threads are managed by the operating system, allowing them to be executed on different CPUs simultaneously.

58
Q

What is simultaneous multithreading (Hyper-Threading), and how does it differ from software threads?

A

Simultaneous multithreading is a hardware feature that allows a single CPU to present itself as multiple logical processors, enabling better hardware resource utilization. Unlike software threads, it is managed at the hardware level.

59
Q

Why is process switching between threads less resource-intensive when managed by the same CPU?

A

When threads are managed by the same CPU, they share the same address space, which avoids the overhead of switching between different processes, making execution faster.

60
Q

What is the central resource in a computing system alongside the CPU?

A

The main memory is the central resource alongside the CPU in a computing system.

61
Q

How is the main memory managed in modern operating systems?

A

The operating system abstracts and manages the main memory, often using techniques like virtual memory management.

62
Q

What problem arises from frequent memory allocation and release?

A

Memory fragmentation, where small free memory chunks are scattered, preventing allocation of large memory blocks.

63
Q

What is the ‘First Fit’ memory allocation strategy?

A

The ‘First Fit’ strategy searches for the first free memory block large enough for the allocation request and uses it.

64
Q

How does the ‘Best Fit’ strategy allocate memory?

A

The ‘Best Fit’ strategy searches for the free block with the smallest remainder after allocation to minimize wasted space.

65
Q

What is the ‘Worst Fit’ strategy in memory allocation?

A

The ‘Worst Fit’ strategy searches for the free block with the largest remainder, aiming to leave bigger usable fragments.

66
Q

Why is memory protection essential in multitasking systems?

A

Memory protection ensures that processes can only access their own memory, preventing them from affecting other processes or accessing sensitive data.

67
Q

What hardware feature supports memory protection in a CPU?

A

The CPU uses boundary registers to check the validity of addresses and trigger exceptions for memory access violations.

68
Q

What is the purpose of logical addresses in memory management?

A

Logical addresses allow processes to operate as if they have exclusive access to memory, which is then mapped to physical addresses by the MMU.

69
Q

How does the Memory Management Unit (MMU) convert logical addresses to physical addresses?

A

The MMU uses the base and limit registers to convert logical addresses to physical addresses by adding the base value to the logical address.

70
Q

What problem is solved by using virtual memory and paging?

A

Paging solves the problem of needing contiguous physical memory for processes, allowing memory blocks (pages) to be allocated in non-contiguous frames.

71
Q

What are the physical memory blocks called in paging?

A

Physical memory blocks in paging are called page frames.

72
Q

How is the virtual address space organized in a 32-bit processor using paging?

A

In a 32-bit processor, the virtual address space is divided into pages, with each page mapped to a physical memory frame.

73
Q

What is the purpose of the Translation Lookaside Buffer (TLB)?

A

The TLB is a cache that stores recently used page table entries, allowing faster address translation without frequent memory lookups.

74
Q

How does the TLB improve memory access speed in paging systems?

A

The TLB speeds up memory access by caching recent translations of virtual addresses to physical addresses, avoiding repeated searches in the page tables.

75
Q

What is demand paging?

A

Demand paging is a system where pages are loaded into memory only when accessed.

76
Q

What is demand paging?

A

Demand paging is a system where pages are loaded into memory only when accessed, allowing more efficient use of physical memory.

77
Q

What happens when there are no free page frames in memory during demand paging?

A

The operating system will swap out rarely used pages to the hard disk to free up memory for new page allocations.

78
Q

What is the FIFO page replacement strategy?

A

FIFO (First In, First Out) replaces the page that has been in memory the longest.

79
Q

How does the Least Recently Used (LRU) strategy select a page for replacement?

A

LRU selects the page that has not been accessed for the longest time for replacement.

80
Q

What is the Not Recently Used (NRU) replacement strategy?

A

NRU uses flags (ACCESSED and DIRTY) set by the MMU to select pages that have not been recently accessed and have not been modified for replacement.

81
Q

What happens if no pages meet the NRU criteria of being both not accessed and unchanged?

A

The system selects a page that has been accessed but not modified (ACCESSED=1, DIRTY=0), or if necessary, a modified page.

82
Q

How is the main memory of a computer addressed by the CPU?

A

The main memory is addressed with byte granularity by the CPU.

83
Q

How does the hard disk differ in terms of access granularity compared to main memory?

A

Hard disks are accessed in larger blocks, typically a few kilobytes, instead of individual bytes.

84
Q

Why do hard disks work in a block- or sector-oriented manner?

A

This is due to the design of hard disks, where the read/write heads need to be positioned on the correct track, and data is read when the sector passes under the head.

85
Q

What does LBA stand for, and how is it used in file systems?

A

LBA stands for Logical Block Addressing, and it refers to a linear address space used by the operating system to organize data on hard disks in blocks.

86
Q

What is a file system, and how does it abstract hard disk access for users?

A

A file system groups data under a file name, making it manageable as one logical unit. It abstracts the block-based structure of the hard disk into files and directories.

87
Q

What attributes do files usually have in modern file systems?

A

Files have attributes such as length, size, ownership, access permissions, and timestamps.

88
Q

What method is commonly used in modern file systems to manage files?

A

Hierarchical file management through folders and directories.

89
Q

What is formatting in the context of file systems?

A

Formatting is the process of setting up a disk to use a particular file system.

90
Q

What are the two meanings of the term ‘file system’?

A

It can refer to the algorithm used for file management in the operating system or the data format written to the disk.

91
Q

What is an inode in inode-based file systems?

A

An inode is a data structure that contains meta-information about a file, such as its size and access permissions, but not the actual file content.

92
Q

Where are inodes stored, and why must they persist across reboots?

A

Inodes are stored on the hard disk to ensure that file information is retained when the computer is switched off.

93
Q

How does an inode link to the actual contents of a file?

A

Inodes contain references (logical block addresses) to the data blocks where the actual contents of the file are stored.

94
Q

What happens if the references in an inode are insufficient for a larger file?

A

Indirect references are used, which point to blocks containing additional references, allowing for larger files to be managed.

95
Q

What are double and triple indirect references in inode-based systems?

A

Double and triple indirect references are pointers that lead to blocks containing more references, enabling the management of very large files.

96
Q

How are directories implemented in inode-based file systems?

A

A directory is essentially a file containing a table that maps file names to inode addresses, enabling the organization of files within directories.

97
Q

How does backward navigation work in a directory tree?

A

There is usually an entry named ‘..’ that refers to the inode of the parent directory.

98
Q

Why does the root directory not have a name?

A

The root directory is referred to by a placeholder (usually ‘/’) because file names are not stored in inodes.

99
Q

What is the significance of inode #1 in the root directory?

A

Inode #1 refers to the data block that contains the directory entries for the root directory.

100
Q

What is the basic concept that practically all modern computers follow?

A

The von Neumann architecture.

101
Q

What are the primary components of the von Neumann architecture?

A

A central processing unit (CPU), main memory, and the communication infrastructure between them.

102
Q

Why is system software needed in computers?

A

To encapsulate repetitive hardware-related tasks and abstract the hardware with protection mechanisms.

103
Q

What core tasks are performed by the operating system in a von Neumann-based computer?

A

The operating system manages abstraction concepts, such as process management and memory protection.

104
Q

How does the operating system enable the CPU to be used efficiently by several programs?

A

By dividing CPU time into time slices for multiple application programs.

105
Q

What role does memory protection play in a computer system?

A

It ensures that different programs do not interfere with each other unintentionally.

106
Q

How does virtual memory abstract the main memory for processes?

A

Virtual memory allows each process to see the address space as an exclusive resource.

107
Q

What is demand paging, and how is it related to virtual memory?

A

Demand paging is a technique used to load pages of memory only when they are needed, further abstracting main memory.

108
Q

How are hard disk space and file systems integrated into the abstraction concepts provided by the operating system?

A

Hard disk space and file systems are smartly integrated, providing storage and management for files within the abstraction of the system.