Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

OS Exam 1

operating systems exam 1

QuestionAnswer
Kernel Mode vs User Mode Kernel mode allows unrestricted access to system resources, while user mode is restricted.
Kernel Mode vs User Mode Long Kernel mode executes privileged instructions (like modifying the memory map), while user mode runs applications safely without hardware access.
System Call A request from a program to the operating system to perform a specific task.
System Call Long Interface between user applications and kernel services. Example: read(), write(), fork(). It triggers a trap instruction to enter kernel mode.
Process A program in execution.
Process Long Has its own address space, stack, and resources. States include ready, running, and blocked. OS uses a process table to track each process.
Multiprogramming Running multiple programs on a CPU by time-sharing.
Multiprogramming Long Keeps CPU utilization high by switching between jobs when one waits for I/O, allowing overlap of computation and I/O.
Process States The stages a process can be in: ready, running, or blocked.
Process States Long Transitions: running→blocked (I/O wait), blocked→ready (I/O done), ready→running (CPU assigned). No direct ready→blocked transition.
Critical Section A section of code where shared resources are accessed.
Critical Section Long Only one process should be in its critical section at a time to avoid race conditions. Managed by semaphores, mutexes, or monitors.
Race Condition When two or more processes access shared data simultaneously, leading to unpredictable results.
Race Condition Long Occurs without proper synchronization. Example: two processes updating a shared counter. Solutions include semaphores, locks, and atomic operations.
Semaphore A synchronization tool that uses counters to control access to shared resources.
Semaphore Long Two operations: wait(P) and signal(V). Ensures mutual exclusion and prevents race conditions in concurrent systems.
Deadlock A state where processes wait indefinitely for each other's resources.
Deadlock Long Occurs when the four Coffman conditions are met: mutual exclusion, hold and wait, no preemption, circular wait.
Scheduling Algorithm Method for deciding which process runs next.
Scheduling Algorithm Long Examples: FCFS, SJF, Round Robin, Priority, Multilevel Queue. Criteria: CPU utilization, throughput, turnaround time, waiting time, and response time.
Round Robin Scheduling Each process gets CPU time in a cyclic order.
Round Robin Scheduling Long Preemptive scheduling with fixed time quantum q. Fair among processes, average turnaround can increase if q is too small or large.
Priority Scheduling Processes are executed based on priority.
Priority Scheduling Long High-priority processes preempt lower ones. Can lead to starvation; solved by aging (gradual priority increase over time).
Average Turnaround Time Average time from process submission to completion.
Average Turnaround Time Long mean_turnaround = Σ(finish_time_i) / N. Used to evaluate efficiency of scheduling algorithms.
Processor Sharing A system where each process executes one instruction in turn.
Processor Sharing Long Simulates fair sharing. If one process takes T seconds alone, n processes take n*T seconds with processor sharing.
Real-Time Scheduling Scheduling for tasks with timing constraints.
Real-Time Scheduling Long A system is schedulable if Σ(C_i / P_i) <= 1. Example: two voice calls (1ms/5ms) + one video (20ms/40ms) = 0.9, schedulable.
Memory Management The process of controlling and coordinating computer memory.
Memory Management Long Includes allocation, swapping, paging, and segmentation. OS provides abstraction (virtual memory) and protection between processes.
Base and Limit Registers Hardware registers used to define process address boundaries.
Base and Limit Registers Long Base stores start address; limit defines range. Logical address + base = physical address. Prevents memory overlap among processes.
Virtual Memory A memory abstraction that allows programs to use more memory than physically available.
Virtual Memory Long Uses paging or segmentation. Virtual addresses are mapped to physical memory via page tables using an MMU.
Paging Dividing virtual memory into fixed-size pages mapped to frames in physical memory.
Paging Long Translation uses page tables. Equation: physical_address = frame_number * frame_size + offset.
Page Table Data structure that maps virtual pages to physical frames.
Page Table Long Stores frame numbers and status bits (valid, dirty, reference). Large tables are optimized with multi-level paging or TLB caching.
Translation Lookaside Buffer (TLB) Cache for recent virtual-to-physical address translations.
Translation Lookaside Buffer (TLB) Long Speeds up paging by storing recent page mappings. If TLB miss occurs, main memory page table lookup follows.
Segmentation Memory division based on logical program units.
Segmentation Long Each segment (code, data, stack) has variable size. Logical address = segment number + offset.
Page Replacement Algorithm Decides which memory page to remove when a new one is needed.
Page Replacement Algorithm Long Examples: Optimal, FIFO, LRU, Second Chance, Clock, Working Set. LRU approximates "recently used" pages using aging algorithms.
Working Set The set of pages a process is actively using.
Working Set Long Helps control thrashing. Working set size changes dynamically; OS keeps active pages in memory to minimize page faults.
Page Fault When a program accesses a page not in physical memory.
Page Fault Long Triggers OS to load page from disk. Time cost = disk seek + rotation + transfer.
Effective Access Time Average time to access memory considering page faults.
Effective Access Time Long EAT = (1 - p) memory_access_time + p page_fault_time, where p = page fault rate.
Disk Access Time Time to access data on a disk.
Disk Access Time Long T_total = Seek_time + (Rotation_time / 2) + Transfer_time.
Bitmap vs Linked List Allocation Methods to track free memory or disk blocks.
Bitmap vs Linked List Allocation Long Bitmap uses 1 bit per block; Linked list uses pointers for free regions. Bitmap is compact, linked list is efficient for large free spaces.
Inode Data structure storing metadata about a file.
Inode Long Contains file size, permissions, timestamps, and block addresses. Inode structure limits maximum file size based on pointer levels.
Direct and Indirect Blocks Pointers within an inode that locate file data blocks.
Direct and Indirect Blocks Long 10 direct + 1 single, double, triple indirect entries. Max file size = B * (D + P + P^2 + P^3), where P = B / pointer_size.
File System Component managing files and directories on storage.
File System Long Provides abstraction for storage: naming, access, metadata, protection, and persistence across sessions.
File System Operations Basic actions to manage files.
File System Operations Long Include open, read, write, close, seek, create, delete, and rename. Managed via system calls and directory structures.
Hard Link vs Symbolic Link Two ways to reference files.
Hard Link vs Symbolic Link Long Hard link: same inode, same file. Symbolic link: separate inode pointing by path, can cross filesystems.
File Allocation Methods How files occupy disk space.
File Allocation Methods Long Contiguous (fast, fragmentation), Linked (flexible, slow random access), Indexed (direct access via index blocks).
Directory Structure Organization of files in a hierarchy.
Directory Structure Long Single-level (flat) or hierarchical (tree). Paths can be absolute (/usr/bin) or relative (../src).
File Attributes Metadata describing a file
File Attributes Long Include name, size, type, permissions, timestamps, and owner ID. Stored in inodes or directory entries.
Virtual File System (VFS) Abstraction layer for file systems.
Virtual File System (VFS) Long Provides a uniform API to access different file systems (e.g., ext4, FAT32). Uses structures for superblock, inode, and file operations.
Average Memory Access Time (AMAT) Weighted average access time for cache hierarchy.
Average Memory Access Time (AMAT) Long AMAT = (Hit_rate_cache T_cache) + (Miss_rate_cache [Hit_rate_RAM T_RAM + Miss_rate_RAM T_disk]).
Page and Offset Calculation Splitting a virtual address into page and offset.
Page and Offset Calculation Long VPN = floor(VA / PageSize), Offset = VA mod PageSize.
Schedulability Formula Condition to check if real-time tasks meet deadlines.
Schedulability Formula Long Σ(C_i / P_i) <= 1 ensures all tasks are schedulable under EDF.
Turnaround Time Formula Average time from job submission to completion.
Turnaround Time Formula Long mean_turnaround = Σ(finish_time_i) / N.
Maximum File Size (Indirect Blocks) Max file size based on inode pointers.
Maximum File Size (Indirect Blocks) Long Max_size = B * (D + P + P^2 + P^3), where P = B / a.
Rewind Operation Moves file read position to start.
Rewind Operation Long Sequential files use explicit rewind; random-access files use seek(0) to reset the position.
Relative vs Absolute Path Ways to specify file locations.
Relative vs Absolute Path Long Absolute starts from root (/home/user); relative is from current directory (../folder).
Linux Command: pwd Print current working directory.
Linux Command: pwd Long Displays the full path of the current directory.
Linux Command: ls List files in directory.
Linux Command: ls Long Shows directory contents. Options: -l (detailed), -a (include hidden files).
Linux Command: cd Change directory.
Linux Command: cd Long Moves into specified directory. Example: cd /usr/local.
Linux Command: mkdir Create a directory.
Linux Command: mkdir Long Makes a new directory. Example: mkdir new_folder.
Linux Command: rm Remove a file.
Linux Command: rm Long Deletes files; use -r for directories, -f to force removal.
Linux Command: cp Copy files or directories.
Linux Command: cp Long Copies files. Example: cp source.txt dest.txt.
Linux Command: mv Move or rename files
Linux Command: mv Long Moves or renames. Example: mv old.txt new.txt.
Linux Command: cat View file contents.
Linux Command: cat Long Displays file data; can concatenate files.
Linux Command: less View file contents with navigation.
Linux Command: less Long Allows scrolling; q to quit.
Linux Command: head Show first lines of file.
Linux Command: head Long Displays first 10 lines by default. Example: head -n 20 file.txt.
Linux Command: tail Show last lines of file.
Linux Command: tail Long Displays last 10 lines. Option -f follows updates (e.g., logs).
Linux Command: ps Show running processes.
Linux Command: ps Long Lists processes owned by current user.
Linux Command: ps aux Show all processes.
Linux Command: ps aux Long Displays all processes with details: PID, memory, CPU.
Linux Command: top Real-time process viewer.
Linux Command: top Long Displays live CPU/memory usage per process.
Linux Command: chmod Change file permissions.
Linux Command: chmod Long Modifies read/write/execute bits. Example: chmod 755 script.sh.
Linux Command: grep Search text patterns.
Linux Command: grep Long Finds lines matching regex or text. Example: grep error logfile.txt.
Linux Command: find Search for files by name.
Linux Command: find Long Recursively searches directories. Example: find /home -name notes.txt.
Linux Command: ping Test network connectivity.
Linux Command: ping Long Sends ICMP echo requests to verify connection.
Linux Command: ssh Connect to remote system.
Linux Command: ssh Long Securely logs into another machine. Example: ssh user@host.
Linux Command: scp Copy files over SSH.
Linux Command: scp Long Transfers files securely. Example: scp file.txt user@remote:/path/.
Linux Command: df Show disk usage.
Linux Command: df Long Reports filesystem space usage. Example: df -h.
Linux Command: free Show memory usage.
Linux Command: free Long Displays RAM/swap statistics. Example: free -h.
Created by: andytheroo13
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards