# CS-Notes | CyC2018 | Knowledge Base | Instagit

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

GitHub Stars: 184k

Repository: https://github.com/CyC2018/CS-Notes

---

## Articles

### [Effective Techniques for Preventing SQL Injection Attacks](/CyC2018/CS-Notes/sql-injection-prevention-techniques)

Learn effective techniques to prevent SQL injection attacks. Discover how parameterized statements separate code from data, securing your applications.

- Tags: best-practices
- Published: 2026-02-24

### [How the Producer-Consumer Pattern Is Implemented in Distributed Systems Using Message Queues](/CyC2018/CS-Notes/distributed-systems-producer-consumer-pattern-message-queues)

Discover how the producer-consumer pattern works in distributed systems using message queues. Learn about point-to-point and publish-subscribe delivery methods to decouple senders and receivers.

- Tags: how-to-guide
- Published: 2026-02-24

### [Key Differences Between HTTP/1.1, HTTP/2, and HTTP/3: Complete Protocol Comparison](/CyC2018/CS-Notes/http-versions-comparison-http11-http2-http3)

Explore key differences between HTTP/1.1, HTTP/2, and HTTP/3. Understand protocol evolution from TCP to QUIC, binary framing, and multiplexing for faster web performance.

- Tags: deep-dive
- Published: 2026-02-24

### [TCP Three-Way Handshake Process: How TCP Establishes Reliable Connections](/CyC2018/CS-Notes/tcp-three-way-handshake-explained)

Understand the TCP three-way handshake process. Learn how SYN SYN-ACK and ACK establish reliable client-server connections and synchronize sequence numbers.

- Tags: deep-dive
- Published: 2026-02-24

### [What Is the Difference Between a Process and a Thread in Operating Systems?](/CyC2018/CS-Notes/operating-systems-process-vs-thread)

Understand the key difference between a process and a thread in operating systems. Learn how they differ in resource allocation and CPU scheduling to optimize your system knowledge.

- Tags: deep-dive
- Published: 2026-02-24

### [How Message Queues Ensure Reliability and Achieve Exactly-Once Delivery: Architectural Patterns from CS-Notes](/CyC2018/CS-Notes/message-queues-reliability-exactly-once-delivery)

Learn how message queues ensure reliability with transactional tables, consumer acknowledgements, and idempotent consumption for exactly-once delivery. Explore architectural patterns.

- Tags: architecture
- Published: 2026-02-24

### [Write-Through, Write-Back, and Cache-Aside: 3 Essential Caching Strategies Explained](/CyC2018/CS-Notes/caching-strategies-write-through-write-back-cache-aside)

Master write-through, write-back, and cache-aside caching strategies. Understand these essential techniques to optimize your application performance and data consistency.

- Tags: deep-dive
- Published: 2026-02-24

### [How to Implement Distributed Locks with Redis: SETNX vs RedLock](/CyC2018/CS-Notes/redis-distributed-locking-implementation)

Learn to implement distributed locks with Redis using SETNX and RedLock. Understand atomic operations and fault-tolerant coordination for robust concurrency control.

- Tags: how-to-guide
- Published: 2026-02-24

### [MyISAM vs InnoDB: Fundamental Differences Between MySQL Storage Engines](/CyC2018/CS-Notes/mysql-storage-engines-myisam-vs-innodb)

Explore MyISAM vs InnoDB differences. Understand table vs row locking, transaction support, and crash safety to optimize your MySQL performance.

- Tags: deep-dive
- Published: 2026-02-24

### [How ConcurrentHashMap Achieves Thread Safety Without Global Synchronized Blocks](/CyC2018/CS-Notes/concurrenthashmap-thread-safety-without-synchronized)

Discover how ConcurrentHashMap achieves thread safety without global synchronized blocks. Learn about its segment locking and CAS-based atomic operations for high concurrency and performance.

- Tags: deep-dive
- Published: 2026-02-24

### [Thread-Safe Singleton Pattern in Java: 6 Implementation Methods Explained](/CyC2018/CS-Notes/thread-safe-singleton-pattern-java-implementations)

Explore 6 thread-safe Singleton patterns in Java. Learn about Enum, Static Holder, and Double-Checked Locking for robust, efficient, and secure singleton implementation.

- Tags: deep-dive
- Published: 2026-02-24

### [Java Design Patterns: Strategy vs. State – Key Differences Explained](/CyC2018/CS-Notes/java-design-patterns-strategy-vs-state-differences)

Understand the core differences between Java Strategy and State design patterns. Learn when to use each to manage interchangeable algorithms and object behavior transitions effectively.

- Tags: deep-dive
- Published: 2026-02-24

### [Java Memory Model Explained: How the volatile Keyword Controls Visibility and Ordering](/CyC2018/CS-Notes/java-memory-model-volatile-keyword-impact)

Understand the Java Memory Model (JMM) and how the volatile keyword ensures thread visibility and prevents reordering. Learn about memory barriers and main memory writes.

- Tags: deep-dive
- Published: 2026-02-24

### [How AQS AbstractQueuedSynchronizer Powers Java Concurrency Primitives](/CyC2018/CS-Notes/java-concurrency-aqs-abstractqueuedsynchronizer-explained)

Learn how AbstractQueuedSynchronizer AQS powers Java concurrency primitives like ReentrantLock and Semaphore. Understand its queue and state variable for exclusive and shared acquisition.

- Tags: internals
- Published: 2026-02-24

### [Java synchronized vs ReentrantLock: 7 Critical Differences Explained](/CyC2018/CS-Notes/java-synchronized-vs-reentrantlock-differences)

Explore critical differences between Java synchronized and ReentrantLock. Understand JVM versus explicit locks, interruptible acquisition, fairness, and conditions for better concurrency control.

- Tags: deep-dive
- Published: 2026-02-24

### [How the Java Synchronized Keyword Works with Object Monitors and Thread Safety](/CyC2018/CS-Notes/java-synchronized-keyword-threads-object-monitors)

Discover how the Java synchronized keyword ensures thread safety by utilizing object monitors and intrinsic locks. Learn about happens-before relationships for guaranteed memory visibility across threads.

- Tags: deep-dive
- Published: 2026-02-24

