Comprehensive Computer Science Study Guide
Comprehensive Computer Science Study Guide
Quantum computing threatens modern encryption systems because algorithms like Shor's can factor large numbers exponentially faster than classical computers, compromising RSA encryption's security basis. A potential solution is quantum-resistant cryptography, which involves developing cryptographic algorithms believed to be secure against quantum attacks, ensuring data remains protected if quantum technology becomes mainstream .
The ACID properties guarantee transactional integrity in relational databases. Atomicity ensures a transaction is completely executed or not at all; consistency ensures data moves from one valid state to another; isolation manages transaction concurrency without interference; durability guarantees that once a transaction is committed, changes persist even in case of system failures. These properties are critical to uphold consistent and reliable data .
Dijkstra's Algorithm determines the shortest path from a source node to all other nodes in a weighted graph by iteratively selecting the node with the lowest cost from the source, updating the cost to its connected nodes, and marking nodes as visited once their shortest paths are known. Its primary application is in GPS and network routing, where it finds the most efficient path based on various cost metrics, such as time or distance .
Monolithic kernels, like those used in Linux, run all operating system services in the same address space, which reduces communication overhead and results in better performance. However, this design makes the system more prone to crashes if a bug occurs in any service, as all services can directly affect one another . Conversely, microkernels, such as those in QNX, run only essential services in kernel space with other services in user space. This improves stability and security since a failing service can be isolated without affecting the entire system, but this added security and robustness come at the cost of increased complexity and potential communication overhead .
Border Gateway Protocol (BGP) facilitates global internet connectivity by enabling communication among autonomous systems, essentially independent networks that make up the Internet. It determines the routing paths for data across disparate networks worldwide . A failure in BGP can disrupt these pathways by disrupting the rules for routing decisions or the exchange of routing information, potentially impacting large-scale network access, leading to outages for entire regions or countries if alternate paths are not found quickly .
The Banker's Algorithm is employed in multi-threaded systems to prevent deadlocks by assessing and simulating potential sequences of resource allocation to determine if the system can remain in a safe state. It functions by only approving resource allocation requests that lead to states considered 'safe,' meaning there is an available sequence of allocations that allows every process to complete even if all resources are requested at once. If a request could lead to a deadlock, it is deferred to maintain system safety .
The OSI model is a theoretical framework dividing network communication into seven layers, offering a standard for different types of networks beyond just IP-based networks. In contrast, the TCP/IP model is a more simplified and specific framework used for the Internet that merges certain layers into four, facilitating direct implementation and integration with the global Internet infrastructure . The TCP/IP model's practical advantages include its broader adoption, simplicity in network communication processes, and its optimization specifically for Internet data transmission realities, making it the standard for most practical applications .
Out-of-Order Execution (OoOE) enhances processing efficiency by allowing a CPU to execute instructions as soon as their inputs are ready, without regarding their order in the original instruction stream, thus minimizing downtime waiting for slower instructions or data from RAM . Hyper-Threading, or Simultaneous Multithreading (SMT), allows a single CPU core to function as two logical cores. This technology maximizes the use of execution resources under multithreaded workloads by sharing them between two threads while maintaining distinct register sets, increasing the throughput of certain computational tasks .
The memory hierarchy design mitigates the 'Memory Wall' problem by structuring memory access through increasingly fast and costly levels of cache: L1, L2, and L3, before reaching DRAM. This reduces latency by frequently accessing data from faster caches rather than slow RAM . Cache coherency protocols, like MESI, ensure consistency across multiple cache copies in multi-core systems by managing the states of data copies, preventing stale or conflicting data that could arise from one core modifying shared data .
NoSQL databases differ from traditional SQL databases in that they forgo the rigid schema structure, instead opting for flexible data models like document, key-value, graph, or column store, making them better suited to handle large-scale, unstructured or semi-structured data. They support horizontal scaling by distributing data across multiple servers, enhancing fault tolerance and availability, often at the expense of strict consistency. This design caters to massive user bases and distributed systems, unlike traditional databases which focus on consistency at the cost of scalability .