<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: MinhQuan805</title>
    <description>The latest articles on Forem by MinhQuan805 (@quannotes).</description>
    <link>https://forem.com/quannotes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3452094%2F64c4de6f-aba7-408b-b20a-322a8f46765a.png</url>
      <title>Forem: MinhQuan805</title>
      <link>https://forem.com/quannotes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/quannotes"/>
    <language>en</language>
    <item>
      <title>History of NoSQL: The Data Management Revolution</title>
      <dc:creator>MinhQuan805</dc:creator>
      <pubDate>Fri, 05 Sep 2025 11:23:10 +0000</pubDate>
      <link>https://forem.com/quannotes/history-of-nosql-the-data-management-revolution-3g94</link>
      <guid>https://forem.com/quannotes/history-of-nosql-the-data-management-revolution-3g94</guid>
      <description>&lt;p&gt;🌐 To dive deeper into the details of NoSQL, visit: &lt;a href="https://quannotes.vercel.app/" rel="noopener noreferrer"&gt;Quan Note&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;NoSQL&lt;/strong&gt; is a group of database management systems (DBMS) designed to overcome the limitations of traditional relational databases. Unlike systems based on fixed-schema tables, NoSQL offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flexible data models&lt;/strong&gt;: Stores and retrieves data in non-tabular relational formats, such as documents, key-value, wide-column, or graphs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High scalability&lt;/strong&gt;: Supports handling large data volumes and high access loads in distributed environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elasticity&lt;/strong&gt;: Enables rapid changes and efficient data replication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The history of NoSQL is closely tied to the internet boom, the rise of &lt;strong&gt;Web 2.0&lt;/strong&gt; applications, and the need to process unstructured data in large-scale systems.&lt;/p&gt;

&lt;p&gt;NoSQL has become a critical solution for tech giants like Google, Amazon, and Netflix, meeting demands for performance, reliability, and scalability.&lt;/p&gt;






&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qppuuhdpyc6v60e216y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qppuuhdpyc6v60e216y.png" alt="NoSQL Timelines" width="750" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  I. 1960s–2000: The Origins of Non-Relational Databases
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. Early Concepts:
&lt;/h4&gt;

&lt;p&gt;Before NoSQL emerged, non-relational database models already existed, serving large-scale enterprise systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hierarchical databases&lt;/strong&gt;: For example, &lt;strong&gt;IMS&lt;/strong&gt; (Information Management System) by IBM, widely used in banking and aviation systems since the 1960s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network databases&lt;/strong&gt;: For example, &lt;strong&gt;CODASYL&lt;/strong&gt;, enabling complex data modeling through network relationships.
These systems did not use the relational (table-based) model proposed by Edgar F. Codd, which became the standard in the 1970s with databases like Oracle and MySQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  b. Technological Context:
&lt;/h4&gt;

&lt;p&gt;The rise of the internet in the late 1990s transformed how data was generated and used. Web applications like social media, e-commerce, and search engines required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handling &lt;strong&gt;unstructured data&lt;/strong&gt; (e.g., posts, images, videos).&lt;/li&gt;
&lt;li&gt;Supporting high read/write loads from millions of concurrent users.&lt;/li&gt;
&lt;li&gt;Distributed architectures to ensure availability and fault tolerance.&lt;/li&gt;
&lt;li&gt;Traditional relational databases, with fixed schemas and strict consistency requirements, struggled to meet these demands, particularly in horizontal scaling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: These limitations laid the groundwork for the development of non-relational storage systems, leading to the birth of NoSQL.&lt;/p&gt;




&lt;h3&gt;
  
  
  II. 2000s: The Birth of the NoSQL Term
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. Origin of the Term:
&lt;/h4&gt;

&lt;p&gt;In 1998, &lt;strong&gt;Carlo Strozzi&lt;/strong&gt; coined the term &lt;strong&gt;NoSQL&lt;/strong&gt; to describe his lightweight, open-source, non-relational database designed for simplified data storage. However, the concept did not gain widespread traction at the time.&lt;/p&gt;

&lt;h4&gt;
  
  
  b. Scalability Challenges:
&lt;/h4&gt;

&lt;p&gt;In the mid-2000s, major tech companies like &lt;strong&gt;Google&lt;/strong&gt; and &lt;strong&gt;Amazon&lt;/strong&gt; faced unprecedented data management challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google&lt;/strong&gt; developed &lt;strong&gt;Bigtable&lt;/strong&gt; (2006): A distributed storage system designed to handle structured data across thousands of servers. Bigtable powered services like Google Search and Google Maps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon&lt;/strong&gt; created &lt;strong&gt;Dynamo&lt;/strong&gt; (2007): A distributed key-value store optimized for high performance and fault tolerance, supporting services like Amazon’s e-commerce platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These systems laid the foundation for modern NoSQL databases, emphasizing scalability and availability.&lt;/p&gt;

&lt;h4&gt;
  
  
  c. Significance:
&lt;/h4&gt;

&lt;p&gt;The solutions from Google and Amazon inspired the open-source community, leading to the development of systems like &lt;strong&gt;HBase&lt;/strong&gt; (based on Bigtable) and &lt;strong&gt;DynamoDB&lt;/strong&gt; (a commercialized version of Dynamo).&lt;/p&gt;




&lt;h3&gt;
  
  
  III. 2009: The Modern NoSQL Movement
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. Key Milestone:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;In 2009, &lt;strong&gt;Johan Oskarsson&lt;/strong&gt;, an engineer at Last.fm, reused the term &lt;strong&gt;NoSQL&lt;/strong&gt; while organizing an event in San Francisco to discuss non-relational, distributed, and open-source databases.&lt;/li&gt;
&lt;li&gt;The term quickly became a symbol of the movement for non-relational data stores, including open-source implementations of &lt;strong&gt;Bigtable&lt;/strong&gt; (Google) and &lt;strong&gt;DynamoDB&lt;/strong&gt; (Amazon).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  b. Rise of MongoDB and Redis:
&lt;/h4&gt;

&lt;p&gt;Also in 2009, two prominent NoSQL databases emerged and gained widespread adoption:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB&lt;/strong&gt;: A document-based database that allows storage of semi-structured data in JSON or BSON formats. MongoDB is used in applications like e-commerce (eBay) and content management (Forbes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redis&lt;/strong&gt;: A key-value store renowned for its high speed and caching capabilities. Redis is used by Twitter and Stack Overflow for real-time data processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The success of MongoDB and Redis solidified NoSQL as a leading choice for large-scale applications.&lt;/p&gt;




&lt;h3&gt;
  
  
  IV. 2010s: The NoSQL Ecosystem Flourishes
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. NoSQL Explosion:
&lt;/h4&gt;

&lt;p&gt;The NoSQL ecosystem expanded rapidly with the introduction of specialized databases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Neo4j&lt;/strong&gt;: A graph database ideal for applications like social networks and network analysis (e.g., LinkedIn uses Neo4j to analyze user relationships).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elasticsearch&lt;/strong&gt;: A search engine and analytics database used by Wikipedia and eBay for full-text search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HBase&lt;/strong&gt;: A distributed database modeled after Bigtable, used by Facebook for messaging data processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Major companies like &lt;strong&gt;Netflix&lt;/strong&gt;, &lt;strong&gt;LinkedIn&lt;/strong&gt;, and &lt;strong&gt;Twitter&lt;/strong&gt; adopted NoSQL to meet demands for performance and real-time data processing from millions of users.&lt;/p&gt;

&lt;h4&gt;
  
  
  b. CAP Theorem:
&lt;/h4&gt;

&lt;p&gt;Defined by &lt;strong&gt;Eric Brewer&lt;/strong&gt; in 2000 and widely popularized in the 2010s, the CAP theorem became a guiding principle for non-relational database design.&lt;/p&gt;

&lt;p&gt;A distributed data store can only guarantee &lt;strong&gt;two out of three&lt;/strong&gt; of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt;: Data remains consistent after every operation (e.g., all users see the same data after an update).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability&lt;/strong&gt;: The system is always operational with no downtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partition Tolerance&lt;/strong&gt;: The system continues to function even if servers are partitioned and cannot communicate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real-world examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB&lt;/strong&gt; prioritizes consistency and availability in non-partitioned systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cassandra&lt;/strong&gt; prioritizes availability and partition tolerance, ideal for globally distributed applications.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  V. 2020s: Blurring the Lines Between SQL and NoSQL
&lt;/h3&gt;

&lt;h4&gt;
  
  
  a. Convergence of Paradigms:
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Relational databases&lt;/strong&gt; began incorporating NoSQL features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for &lt;strong&gt;JSON&lt;/strong&gt; documents (e.g., PostgreSQL, MySQL).&lt;/li&gt;
&lt;li&gt;Horizontal scaling through technologies like sharding and replication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NoSQL databases&lt;/strong&gt; adopted traditional features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ACID&lt;/strong&gt; transactions (Atomicity, Consistency, Isolation, Durability) to ensure data integrity.&lt;/li&gt;
&lt;li&gt;SQL-like query languages (e.g., Cassandra’s CQL).&lt;/li&gt;
&lt;li&gt;For example, &lt;strong&gt;MongoDB&lt;/strong&gt; introduced multi-document transactions in 2018, blurring the line with SQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  b. Multi-Model Databases:
&lt;/h4&gt;

&lt;p&gt;Systems like &lt;strong&gt;ArangoDB&lt;/strong&gt;, &lt;strong&gt;OrientDB&lt;/strong&gt;, and &lt;strong&gt;Azure Cosmos DB&lt;/strong&gt; support multiple data models (document, graph, key-value) within a single system.&lt;/p&gt;

&lt;p&gt;This trend reflects the need for flexible storage solutions suited for complex applications like artificial intelligence (AI) and big data analytics.&lt;/p&gt;






&lt;h3&gt;
  
  
  📝 Contact Me
&lt;/h3&gt;

&lt;p&gt;✍️ Blog: &lt;a href="https://quannotes.vercel.app/" rel="noopener noreferrer"&gt;Quan Notes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💼 LinkedIn: &lt;a href="https://www.linkedin.com/in/v%C3%B5-minh-qu%C3%A2n-821704325/" rel="noopener noreferrer"&gt;Võ Minh Quân&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>nosql</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>How does CPU scheduling ensure that every real-time task meets its deadline?</title>
      <dc:creator>MinhQuan805</dc:creator>
      <pubDate>Mon, 25 Aug 2025 13:54:46 +0000</pubDate>
      <link>https://forem.com/quannotes/cpu-scheduling-in-real-time-systems-4kbc</link>
      <guid>https://forem.com/quannotes/cpu-scheduling-in-real-time-systems-4kbc</guid>
      <description>

&lt;p&gt;For a deeper understanding of operating systems and related concepts, feel free to explore more resources on my website: &lt;a href="https://quannotes.vercel.app/" rel="noopener noreferrer"&gt;Quan Notes&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Scheduling is the strategy of selecting the most suitable process to execute in order to achieve the highest efficiency. &lt;/p&gt;

&lt;p&gt;Real-time systems are designed to perform real-time tasks, which need to be executed immediately with a certain degree of urgency. &lt;/p&gt;

&lt;p&gt;CPU scheduling for real-time systems poses many challenges due to the real-time requirements.&lt;/p&gt;

&lt;p&gt;There are two types of real-time systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Soft real-time systems:&lt;/strong&gt; Critical tasks are given the highest priority, but no other guarantees are provided.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard real-time systems&lt;/strong&gt;: Tasks must be completed before their deadlines. If a task misses its deadline, it is considered a failure, and execution after the deadline has no value or may be canceled by the system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we will explore some issues related to process scheduling in both soft and hard real-time systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  I. Minimizing Latency
&lt;/h2&gt;

&lt;p&gt;Real-time systems operate on an event-driven model, waiting for events from software (e.g., a timer expiring) or hardware (e.g., a remote-controlled device detecting an obstacle). When an event occurs, the system must respond and process it quickly. &lt;br&gt;
Event latency is the time from when an event occurs to when it is serviced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j8lcmxm2pncgdvb4agy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j8lcmxm2pncgdvb4agy.png" alt=" " width="626" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Events in real-time systems have varying latency requirements. For example, an anti-lock braking system requires a latency of 3–5 milliseconds to respond when a wheel slips, otherwise the car may lose control. In contrast, a radar system on an aircraft may tolerate a latency of a few seconds.&lt;br&gt;
There are two decision-making modes in scheduling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non-preemptive&lt;/strong&gt;: Once in the running state, a process will execute until it completes or is interrupted due to an I/O request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Preemptive&lt;/strong&gt;: A running process can be interrupted mid-execution and moved back to the ready state.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The performance of real-time systems is affected by two types of latency:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interrupt Latency&lt;/strong&gt;: The time from when an interrupt reaches the CPU to when the interrupt service routine (ISR) begins. &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The operating system must complete the current instruction, identify the type of interrupt, save the current process state, and then handle the interrupt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Minimizing and bounding interrupt latency is critical, especially in hard real-time systems, and interrupts can only be disabled for very short periods to update kernel data structures.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5chsk8vaccoci8gfkvfo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5chsk8vaccoci8gfkvfo.png" alt=" " width="671" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dispatch Latency&lt;/strong&gt;: The time it takes for the scheduler to stop one process and start another. The most effective technique for keeping dispatch latency low is to provide a preemptive kernel, which includes: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Conflict Phase: Pausing kernel tasks and releasing resources from lower-priority processes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dispatch Phase: Scheduling a higher-priority process onto the CPU.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5a8nf479hf7h60ikjye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5a8nf479hf7h60ikjye.png" alt=" " width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real-time systems need to minimize both interrupt latency and dispatch latency to ensure immediate responses for real-time tasks.&lt;/p&gt;




&lt;h2&gt;
  
  
  II. Priority-Based Scheduling
&lt;/h2&gt;

&lt;p&gt;The core feature of a real-time operating system is the ability to respond immediately to real-time processes when they request CPU time. Therefore, the scheduler must support priority-based scheduling with preemption.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;These algorithms assign priorities to processes based on their importance; more critical tasks are given higher priority.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If preemption is supported, a running process will be paused when a higher-priority process becomes ready.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Operating systems like Windows, Linux, and Solaris assign the highest priority to real-time processes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows has 32 priority levels, with levels 16–31 reserved for real-time processes. Linux and Solaris have similar mechanisms.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Priority-based scheduling with preemption only guarantees functionality for soft real-time systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hard real-time systems further ensure that tasks are serviced by their deadlines, requiring additional scheduling features.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  III. Task Models in Real-Time Systems
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Periodic Tasks
&lt;/h3&gt;

&lt;p&gt;These are real-time tasks that repeat after a fixed time interval, known as the period.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;These tasks are triggered by clock interrupts. For example, collecting data from a sensor every 5 seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8c7qc7c2sofm97u5vgs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8c7qc7c2sofm97u5vgs.png" alt=" " width="800" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  a. Rate Monotonic Scheduling (RMS)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Priority is assigned based on the inverse of the period: shorter periods receive higher priority, and longer periods receive lower priority.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A set of processes can be scheduled if it satisfies the formula: &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehk9l4dwz1w1uuj56jig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehk9l4dwz1w1uuj56jig.png" alt=" " width="500" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkq6gxy8fow8iplnobl1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkq6gxy8fow8iplnobl1z.png" alt=" " width="417" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To understand Rate Monotonic scheduling, consider the following example table: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foitt80t3zmm0s3bkabuo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foitt80t3zmm0s3bkabuo.png" alt=" " width="720" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Calculating Utilization (U):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd47809rq88j535vjmfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd47809rq88j535vjmfc.png" alt="Image description" width="498" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The RMS threshold for n = 3:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1yaz1x1f5yb675cgcnxp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1yaz1x1f5yb675cgcnxp.png" alt=" " width="664" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Result: U=0.75 ≤ 0.7797, so this set of processes is schedulable with RMS.&lt;/p&gt;

&lt;p&gt;Based on periods:&lt;br&gt;&lt;br&gt;
• P1(T1 = 20): Lowest priority.&lt;br&gt;&lt;br&gt;
• P2(T2 = 5): Highest priority.&lt;br&gt;&lt;br&gt;
• P3(T3 = 10): Second-highest priority.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Priority order&lt;/strong&gt;: P2 &amp;gt; P3 &amp;gt; P1.&lt;/p&gt;

&lt;h4&gt;
  
  
  b. Earliest Deadline First (EDF)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is an optimal dynamic priority scheduling algorithm for real-time systems, applicable to both static and dynamic scheduling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Priority Principle: The process with the earliest deadline is assigned the highest priority, while processes with later deadlines receive lower priority.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;High Efficiency: Can achieve 100% CPU utilization while ensuring all processes meet their deadlines, as long as the schedule is feasible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Priority Adjustment: When a new process becomes ready, it announces its deadline to the system, and the priorities of existing processes are dynamically adjusted based on the new deadline.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Aperiodic Tasks
&lt;/h3&gt;

&lt;p&gt;These are real-time tasks that occur at random times, without a fixed period.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7ycm9nnyi14dx7q08gr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7ycm9nnyi14dx7q08gr.png" alt=" " width="800" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The time between two occurrences can be very short (even zero) or very long.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These tasks are typically soft real-time and involve random interactions, e.g., pressing a key on a keyboard for input.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduling algorithms for periodic tasks, such as Total Bandwidth Server and Enhanced Virtual Release Advancing, can be explored further.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Silberschatz, A., Gagne, G., &amp;amp; Galvin, P. B. (n.d.). Operating System Concepts. [Edition number if known, e.g., 10th ed.]. Wiley.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;For more insights, visit my website: &lt;a href="https://quannotes.vercel.app/" rel="noopener noreferrer"&gt;Quan Notes&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;

</description>
      <category>os</category>
    </item>
  </channel>
</rss>
