Show Menu
Cheatography

Operating Systems Cheat Sheet (DRAFT) by

This is a cheat sheet created for Operating Systems Final Exam

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Memory Management

* Virtual address is translated to a physical address using a page table
Multi-­level Page Tables are used to reduce memory overhead in page tables. Instead of a singel­-level structure, a multi-­level page table uses multiple levels of tables to represent the virtua­l-t­o-p­hysical address mapping
* A linear page table is a one-di­men­sional array where each entry corres­ponds to a page. The virtual address is divided into a page number and an offset within the page
* Super Pages are larger­-th­an-­normal memory pages that can be used to increase TLB efficiency and reduce overhead associated with managing multiple smaller pages
* Transl­ation Lookaside Buffer (TLB) is a hardware cache that store recent transl­ations of virtual addresses to physical addresses, reducing the time needed for address transl­ation

Security & Crypto­graphy

* Public Key Encryption - involves a pair of keys: a public key for encryption and a private key for decryp­tion. Message decrypted with the public key can only be decrypted by the corres­ponding private key
* Crypto­graphy - ensures data privacy by encrypting sensitive inform­ation, data integrity by providing mechanisms to detect tampering, and authen­tic­ation by verifying the identity of commun­ication parties
* Transport Layer Security (TLS) - Provides secure commun­ication over a network. It operates above the transport layer (usually TCP), encrypting data to ensure confid­ent­iality and using certif­icates for authen­tic­ation
 

Process Management

* Swapping involves moving entire processes between main memory and secondary storage to free up space in RAM. It helps manage memory constr­aints by tempor­arily storing less frequently used processes on disk
* Page Fault occurs when a process tries to access a page not currently in physical memory. the OS, through the page faul handler, brings the required page into memory from disk, updates the page table, and allows the process to continue
* Malloc() - a function for dynamic memory alloca­tion, typically used for creating variab­le-­sized blocks of memory on the heap
* Mmap() maps files or devices into memory, often used for memory­-mapped files or creating shared memory regions. It can create shared memeory regions between processes by mapping the same file into their virtual address spaces
 

Memory Consis­tency and File Systems

* Sequential Consis­tency - ensures that the execution of operations in a parallel program appears as if they are executed in some sequential order. it provides a clear, unders­tan­dable model for concurrent program execution
* Sequential Consis­tency in Modern Proces­sors: - Achieving strict sequential consis­tency can lead to perfor­mance degrad­ation in modern proces­sors. Processors often use Optimi­zation like out-of­-order execution and catching that may violate strict sequential consis­tency to improve speed
* Hard Links - Create additional directory entries pointing to the same inode, effect­ively creating multiple names for the same file
* Soft Links - Create a separate file containing the path to the target file
* File System - are organized on disk with partit­ions, file allocation tables (FAT), or inode tables
* Free Command - Displays inform­ation about system memory usage
* Page Cache- stores frequently accessed disk pages in memory, reducing the need for repeated disk access.
* Buffering - Involves tempor­arily storing data in a buffer before writing it to disk, optimizing disk I/O
 

Networking

* IPv4 Addresses - 32-bit numerical labels assigned to devices on a network
* IPv6 Addresses - 128-bit numerical labels designed to address the limitation of IPv4 and accomm­odate the growing number of connected devices
* UPD (User Datagram Protocol) - a connec­tio­nless, lightw­eight protocol that does not guarantee delivery or order of packets
* TCP (Trans­mission Control Protocol) - a connec­tio­n-o­riented protocol that ensures reliable, ordered, and error-­checked delivery
* Data Marsha­lling - Involves converting data from one repres­ent­ation to another for commun­ication between systems with different archit­ectures or byte orders. it ensures compat­ibility in network commun­ication
* Remote Procedure Call (RPC) - enables programs to execute procedures on a remote machine as if they were local. It involves marsha­lling parame­ters, making the remote call, and unmars­halling results.