Study Guide Flashcards

(170 cards)

1
Q

What are the three main goals of an operating system?

A
  1. Efficiently manage hardware resources (maximize performance and resource usage)
  2. Provide user-friendly interaction (make using the system easy and convenient)
  3. Hide hardware complexity (offer abstraction so users/programs don’t deal with low-level details)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What kind of key does symmetric cryptography use for encryption and decryption?

A

Same key — Private for both

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

Which algorithm is used in symmetric cryptography?

A

DES

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

What kind of keys are used in asymmetric cryptography?

A

Encrypt with the public key, decrypt with the private key

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

Which algorithm is used in asymmetric cryptography?

A

RSA

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

What is a man-in-the-middle attack?

A

When someone secretly intercepts and possibly changes the conversation between two people — pretending to be one of them to steal info.

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

What is a logic bomb?

A

Hidden code that waits until certain conditions are met, then it triggers and causes damage.

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

What is a backdoor?

A

A secret way to get back into a system — often left by attackers after a hack so they can sneak in again.

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

What is session hijacking?

A

When someone takes over your active session and pretends to be you — without needing your password.

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

What is social engineering?

A

Tricking or manipulating people into giving up info — like phishing, fake support calls, or pretending to be someone you trust.

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

What’s the difference between breach of confidentiality and integrity?

A

Confidentiality: Someone sees private data they shouldn’t.
Integrity: Someone changes data they shouldn’t.

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

What is a denial-of-service (DoS) attack?

A

Flooding a site or system with traffic so it crashes or becomes unusable.

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

Ransomware vs Spyware?

A

Ransomware: Locks your files and demands money.
Spyware: Secretly collects your private info.

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

Boot virus vs Rootkit?

A

Boot virus: Hits during startup.
Rootkit: Hides in the system to avoid detection and give control to hackers.

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

Virus vs Worm?

A

Virus: Needs user action to spread.
Worm: Spreads itself across networks without help.

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

What is a Trojan horse?

A

Fake legit-looking software that hides malware — seems safe but it’s not.

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

What is a code-injection attack?

A

Hacker inserts malicious code into a program input (like a login form) to trick the system — ex: SQL injection.

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

Why use a sandbox?

A

To test code or software in a safe, isolated space that can’t mess up the real system.

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

What is a hash?

A

A unique fingerprint of data — used to check if anything has been changed.

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

What is a DDoS attack?

A

A bunch of systems flood a target all at once to take it down — like DoS but way more intense.

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

What does “defense in depth” mean?

A

Having multiple layers of protection — if one fails, others still keep things safe.

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

What is two-factor authentication (2FA)?

A

You need two of these to log in:

Something you know (password)
Something you have (phone)
Something you are (fingerprint)

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

What is a Message-Authentication Code (MAC)?

A

A Message-Authentication Code (MAC) is a security tag added to a message to ensure both data integrity and authenticity.

It is generated using a shared secret key and a cryptographic algorithm. The receiver uses the same key to verify that the message has not been altered and that it came from a trusted source.

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

What is a stream cipher?

A

A stream cipher encrypts data one bit or byte at a time, often in real-time as the data is transmitted.
It’s typically used for live communication, like voice or video calls.
Example: RC4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is a block cipher?
A block cipher encrypts data in fixed-size blocks (e.g., 64 or 128 bits) at a time. It’s commonly used for file encryption and structured data. Example: AES
26
What is a Message-Authentication Code (MAC) and how does it work?
A MAC is an authentication algorithm that uses symmetric encryption. It creates a cryptographic checksum using a shared secret key and the message. Both the sender and receiver use the same key to generate and verify the MAC. Used for ensuring data integrity and authenticity of short messages.
27
What is a digital signature and how does it work?
A digital signature uses asymmetric encryption to verify message authenticity. The private key is used to sign the message, and the public key is used to verify it. This allows anyone to confirm the message is real, but only the private key holder could’ve signed it.
28
What is a capability list?
A capability list is tied to a domain (a user or process) and shows what objects it can access and what actions it can perform.
29
What is an access list?
An access list is tied to an object (like a file) and lists which domains (users or processes) can access it and what permissions they have.
30
What is logical memory?
Logical memory is the abstract address space a program uses. It lets each process think it has its own private memory, even though it’s being managed behind the scenes by the OS.
31
How are logical memory and virtual memory connected?
Logical memory provides the abstract addresses for a program. Virtual memory is how the OS backs those addresses using RAM and disk, allowing programs to run even when physical memory is limited.
32
What does DMA (Direct Memory Access) actually do, and why is it useful?
DMA moves blocks of data into or out of RAM without needing the CPU to handle each step. This lets the CPU focus on other tasks while large data transfers happen in the background, improving speed and system performance.
33
What is a page table?
A page table maps each logical page number to the base address of a page frame in physical memory. It helps the system translate logical addresses into physical addresses so programs can use memory without knowing its real location.
34
What is a page?
A page is a fixed-size block of logical memory. It’s part of a program’s address space and is what the program thinks it’s using when it references memory.
35
What is a page frame?
A page frame is a fixed-size block of physical memory (RAM). It’s where the contents of a logical page are actually stored after address translation.
36
What is page replacement?
When all memory frames are full and the system has to choose a page to remove to load a new one.
37
What is page fault rate?
The percentage of memory accesses that result in a page fault (page not found in memory).
38
What is the best page replacement algorithm?
The optimal page replacement algorithm — replaces the page that won’t be used for the longest time in the future (theoretical).
39
Which page replacement algorithm results in the fewest number of page faults?
The optimal algorithm — it has the lowest possible page fault rate but isn’t practical to implement.
40
What is the optimal page replacement algorithm?
Replaces the page that won’t be needed for the longest time. It's the most efficient, but can’t be used in practice because the future can't be predicted.
41
What is the FIFO page replacement algorithm?
First-In, First-Out — removes the oldest page first. Simple, but not always efficient.
42
What is the LRU page replacement algorithm?
Least Recently Used — removes the page that hasn’t been used in the longest time. Based on the idea that recently used pages will be used again soon.
43
What is the valid-invalid bit in page replacement?
Indicates if a page is currently in memory (valid) or not (invalid). Helps detect if a page fault is needed.
44
What is Belady’s anomaly?
A situation where adding more memory frames results in more page faults. Happens with FIFO.
45
What is the Working-Set Model?
Tracks the set of pages a process is actively using to reduce page faults. Tries to keep the 'working set' in memory.
46
What is the difference between global and local replacement?
Global: a process can take frames from any process. Local: a process can only use its own set of frames.
47
What is Page Fault Frequency (PFF)?
A strategy that adjusts memory allocation by tracking how often page faults happen. Helps balance performance.
48
What is thrashing?
When the system spends more time swapping pages than doing actual work — caused by high page fault rates and not enough memory.
49
Internal fragmentation
Wasted space inside an allocated memory block because the process didn’t use all of it.
50
External fragmentation
Wasted space outside allocated blocks — free memory is split into chunks too small to use.
51
What is a boot partition?
A section of the disk that stores the files needed to start the operating system, like the bootloader and OS kernel.
52
Steps of the boot process
 bootstrap loader > loads boot blocks from boot disk > bootstrap program from boot block > Loads MBR (master boot record) > MBR identifies boot partition, loads its boot sector > boot sector loads OS kernel
53
What is a Segment?
A logical unit of memory like code, data, or stack — used to divide a program for memory management.
54
What is a Segment Table?
Maps each segment to its starting address and length in physical memory.
55
What is Address Translation?
Converts a logical address (segment + offset) to a physical address using the segment table.
56
What is a TLB (Translation Lookaside Buffer)?
A fast cache that stores recent logical → physical address translations to avoid repeated lookups.
57
What is Hit Ratio?
The percentage of address lookups that are successfully found in the TLB.
58
What is Segment Offset?
The distance from the start of a segment to a specific memory location — the 'address within the segment.'
59
What is a program in execution called?
A process
60
What is a PCB and its purpose?
A data structure that stores all info about a process — used by the OS to track and manage the process
61
How many threads are there to a process?
One or more — a process can be single-threaded or multithreaded
62
How many processes per PCB?
One — each process has exactly one PCB
63
What is a program counter?
A register that holds the address of the next instruction the CPU will execute
64
What is the difference between PC and PCB?
PC is a hardware register for the next instruction. PCB is a software structure that stores the PC and other process info to manage execution and switching.
65
Layer: Application Programs
Programs that request file operations like open, read, write (e.g., Word, Python, text editor).
66
Layer: Logical File System
Manages metadata, directory structure, file-control blocks (like inodes), and access permissions; provides protection and passes file info to the file-organization module.
67
Layer: File-Organization Module
Maps logical file operations to physical block locations. Example: Finds which disk blocks hold file.txt.
68
Layer: Basic File System
Handles reading/writing blocks of data. Example: Read 512 bytes starting at block 105.
69
Layer: I/O Control
Contains device drivers and handles low-level communication with hardware. Example: Tells disk to spin and read.
70
Layer: Devices
The actual hardware that stores data. Example: SSD, HDD, USB drive.
71
Where are files stored in UNIX?
UFS and FFS (Unix and Fast File System)
72
Where are files stored in Windows?
NTFS, FAT, and FAT32
73
Where are files stored in Linux?
ext3 and ext4
74
Where are files stored in macOS?
APFS (modern) and HFS+ (older)
75
What is a Magic Number (in file systems)?
A unique value at the beginning of a file that identifies its type so the OS knows how to handle it.
76
What is a Shared Lock on a file?
A lock that allows multiple users or processes to read the file at the same time but not write.
77
What is an Exclusive Lock on a file?
A lock that only allows one process full access—others can't read or write until it's released.
78
What is the difference between truncating and deleting a file?
Truncating clears the file’s contents but keeps the file. Deleting removes the file from the system entirely.
79
Why is a file extension vulnerable to corruption issues?
Because changing the file extension doesn’t change the file type, it can cause confusion or be used to hide malware.
80
Where are files stored in UNIX?
FFS (Fast File System)
81
Where are files stored in Windows?
NTFS, FAT, or FAT32
82
Where are files stored in Linux?
ext3, ext4
83
Where are files stored in macOS?
APFS, HFS+
84
NTFS (New Technology File System)
Microsoft-designed, supports 64-bit volumes, journaling, and file-based data compression.
85
EXT2 (Second Extended File System)
No journaling; recommended for flash drives and USB drives due to low write overhead.
86
EXT3 (Third Extended File System)
Adds journaling to EXT2, reducing file system corruption risk.
87
EXT4 (Fourth Extended File System)
Supports larger files/systems, adds multiblock allocation, delayed allocation, and journal checksums.
88
What is a shared lock in a file system?
A lock that allows multiple processes to read a file, but none can write to it.
89
What is an exclusive lock in a file system?
A lock that allows only one process to read or write to a file; all others are blocked.
90
What does truncating a file do?
Empties the file’s contents but keeps the file itself in the file system.
91
What does deleting a file do?
Removes the file completely from the file system, including its metadata.
92
What is a tree-structured directory?
A hierarchical file system where each directory has one parent, forming a tree-like structure. Allows subdirectories under a root directory.
93
What is an acyclic directory structure?
A directory structure that allows shared files or directories through links but avoids loops (no cycles). Ensures a single upward path to the root.
94
Key difference between tree-structured and acyclic directory structures?
Tree-structured has strict parent-child hierarchy; acyclic allows links (shared directories) as long as no cycles are formed.
95
What is the Boot Control Block (BCB)?
A section of a storage device that contains information needed to load the operating system, like where to find the OS kernel.
96
What is the File Control Block (FCB)?
A data structure that stores metadata about a file, such as its name, size, permissions, and location on disk.
97
What is the Mount Table?
A table maintained by the OS that tracks all currently mounted file systems and their associated mount points.
98
What is the Master File Table (MFT)?
Used by NTFS, it contains metadata and tracking info for every file and folder on the system, including small file content.
99
What is a Bit Vector (bitmap)?
A sequence of bits where each bit represents a disk block: 0 for free, 1 for used — helps the OS manage storage efficiently.
100
What is contiguous allocation?
A method where all file blocks are stored together in a sequence. Fast sequential access. Causes external fragmentation. Hard to grow file size.
101
What is clustered allocation?
A variation of linked allocation where blocks are grouped into clusters. Reduces pointer overhead. Improves disk access performance. Can cause internal fragmentation.
102
What is linked allocation?
A method where each file block contains a pointer to the next block. No external fragmentation. Good for sequential access. Slow random access. Some space used for pointers.
103
104
File Operation: Create File – What happens with the file and the FCB?
Allocates space and creates a new FCB with metadata (name, size, location). The FCB is stored in the directory.
105
File Operation: Destroy File – What happens with the file and the FCB?
Deletes the FCB and directory entry. Frees all disk blocks used by the file.
106
File Operation: Open File Table – What happens with the file and the FCB?
A system-wide table that holds pointers to FCBs and tracks which files are open, allowing efficient access and sharing across processes.
107
File Operation: Open File – What happens with the file and the FCB?
Loads the FCB into memory (if not already loaded) and adds an entry to the process's open file table pointing to the system-wide table.
108
File Operation: Read File – What happens with the file and the FCB?
Uses FCB data to locate file blocks on disk. Reads data and updates the read pointer in the open file table.
109
File Operation: Write – What happens with the file and the FCB?
Uses the FCB to locate the correct block. Writes data, updates file size and modification time in the FCB.
110
File Operation: Seek – What happens with the file and the FCB?
Updates the current file pointer using data in the FCB so that future reads or writes happen at a new position.
111
What is the main difference between EXT2 and EXT3 file systems?
EXT3 supports journaling, which helps prevent file system corruption. EXT2 does not support journaling.
112
What feature in NTFS helps ensure file system reliability?
NTFS uses journaling to track changes before they are committed, helping prevent file system corruption after crashes.
113
Which Linux file system supports large files and system sizes with features like multiblock allocation?
EXT4 supports large files, large file systems, multiblock allocation, and journaling.
114
What is the role of the Master File Table (MFT) in NTFS?
The MFT is a special file in NTFS that contains metadata and file records for every file and directory on the volume.
115
Which Linux file system is recommended for use on flash drives and USB drives?
EXT2 is recommended because it does not use journaling, reducing unnecessary write operations that can wear out flash storage.
116
Displays file contents (Linux command)
cat
117
Changes file permissions (Linux command)
chmod
118
Compares two files (Linux command)
cmp
119
Sorts lines of text (Linux command)
sort
120
Searches for files (Linux command)
find
121
Compresses files (Linux command)
gzip
122
Views text one page at a time (Linux command)
more
123
Ends a process (Linux command)
kill
124
Shows current username (Linux command)
whoami
125
Displays network settings (Linux command)
ifconfig
126
Archives files (Linux command)
tar
127
Shows system processes and usage (Linux command)
top
128
What is a Raw disk in a file system context?
A disk where no file system is used.
129
What is a Cooked disk in operating systems?
A disk that uses a file system.
130
What is the purpose of the Bootstrap program in an operating system?
It allows the computer to start running by initializing hardware and loading the kernel.
131
What is the Boot control block (per volume)?
A storage block of data containing info needed by the system to boot from the volume containing the block.
132
What is the Partition Boot Sector?
The NTFS boot control block.
133
What does the Volume control block store?
Volume details like number of blocks, block size, and free block pointers.
134
What is mounting in operating systems?
Attaching a file system to a directory structure so it can be accessed by the OS and users.
135
What are the three steps in mounting a file system?
1. Locate the device that contains the file system. 2. Read the file system's metadata (like the superblock). 3. Link the file system to a mount point in the directory tree.
136
What is the purpose of the mount command in Linux?
To manually attach (mount) a file system to a specified directory in the Linux file system tree.
137
What is memory mapping?
It's when a file is loaded into a program’s memory so it can be read or changed like regular variables, without using read/write system calls.
138
What is memory-mapped I/O?
It’s when the CPU talks to hardware (like a keyboard or printer) using memory addresses, instead of special I/O instructions.
139
What is a port?
A physical or virtual connection point that allows data to flow between the computer and an external device.
140
What is a bus in a computer system?
A shared communication path that transfers data between components like the CPU, memory, and peripherals.
141
What is a daisy chain?
A method of connecting multiple devices in a series so they share a single communication path.
142
What does a device driver do?
Software that allows the OS to communicate with hardware by translating system calls into hardware-specific instructions.
143
What is a device controller?
A hardware component that manages a specific I/O device and handles the details of data transfer with the computer.
144
What is polling?
A method where the CPU repeatedly checks if an I/O device is ready — wastes CPU cycles when nothing is happening.
145
What is an interrupt?
A signal from an I/O device that tells the CPU it needs attention — more efficient than polling.
146
Why are interrupts more efficient than polling?
Because the CPU can focus on other tasks and only respond when needed.
147
What is the interrupt request line (IRQ)?
A special hardware line that devices use to signal the CPU when they need service.
148
What happens when a device uses the interrupt request line?
The CPU pauses its current task, saves its state, and handles the device’s needs.
149
What does ‘maskable’ mean in interrupt handling?
It means the interrupt can be ignored (masked) by the CPU if it’s not a high priority.
150
Why would an interrupt be masked?
To prevent it from interrupting critical operations or higher-priority tasks.
151
Track
One or many concentric rings on a magnetic disk surface
152
Sector
Smallest portion of a track that can be read or written to via a single r/w operation. Each sector reads/writes data in blocks.
153
Seek time
Time it takes to move the r/w head from its current position to the track containing the correct data; proportional to distance traveled
154
Rotational latency
Time it takes for the desired sector to rotate under the r/w head; typically proportional to half a disk revolution
155
Transfer time
Time to transfer the requested bits to or from the disk; depends on disk speed
156
Transfer mode
Data streamed to or from the disk once the r/w head reaches the start of the sector
157
Transfer rate
The rate at which data can be transferred continuously once transfer starts
158
Head crash
When the r/w head touches the disk platter, potentially causing physical damage
159
Zoned-bit recording
A method where outer tracks hold more sectors than inner ones, increasing capacity while keeping density and transfer rates steady
160
Constant angular velocity (CAV)
A spinning method where the disk speed stays constant; transfer rate changes depending on which track is being read
161
STREAMS
UNIX I/O feature for creating driver code pipelines; allows dynamic creation of communication channels between user processes and device drivers.
162
stream head
Interface that connects STREAMS to user processes; starting point for data entering the stream.
163
stream modules
Loadable components placed between the stream head and the driver end that add or modify functions within the STREAMS stack.
164
driver end
Interface that connects the STREAMS pipeline to the actual controlled device; final destination for outgoing data.
165
encapsulation
The process of wrapping data with headers or metadata to maintain message boundaries and control data flow within STREAMS.
166
flow control
Method for managing data flow by pausing the sender to prevent buffer overflow; often used when interacting with the stream head.
167
write() or putmsg()
UNIX system calls used to send data down the STREAMS pipeline.
168
read() or getmsg()
UNIX system calls used to retrieve messages from the STREAMS pipeline.
169
asynchronous I/O
Type of I/O operation where processes can continue running while I/O completes in the background; supported by STREAMS.
170
ioctl() system call
Used to dynamically add or remove modules within the STREAMS pipeline.