Research on the Teaching Method of Process Synchronization of Computer Operating Systems

Jiuru Wang, Lihua Han, Xiaojie Wang, Yulong ZuoAdvances 2015 · DOI

Abstract

Process synchronization is a fundamental yet challenging topic in operating systems education. This paper introduces a novel teaching methodology that adapts database Entity-Relationship (E-R) diagrams to model process synchronization. By representing process entities as rectangles, relationships as diamonds, and semaphores as ovals, this modified E-R framework provides a structured visual language for students. Teaching practice indicates that this approach clarifies the connections between process entities and enhances students' problem-solving abilities in concurrency design.

Introduction: The Challenge of Concurrency

In computer science curricula, "Process Synchronization" often represents the steepest learning curve for students. It involves the logic required to manage multiple processes sharing resources without data corruption or deadlocks. The difficulty stems from several factors: the lack of prior design patterns in early coursework, the high level of abstraction, and the complexity of translating natural language problem descriptions into formal code. Currently, many instructors rely on intuition rather than a standardized methodology, leaving students struggling to initiate design when faced with complex synchronization problems.

Methodology: The Modified E-R Diagram

To bridge the gap between theory and implementation, we propose a "Modified E-R Diagram" approach. This method leverages the familiar visual syntax of database design to map out synchronization logic:

  • Process Entities (Rectangles): Represent the active participants in a system, such as a "Producer" or "Consumer."
  • Relationships (Diamonds): Define how these entities interact. These are categorized into Mutual Exclusion (competing for a shared resource) and Synchronization (cooperating in a specific sequence).
  • Semaphores (Ovals/Rounded Rectangles): Represent the control variables. For instance, a mutex semaphore might be associated with a Mutual Exclusion relationship.
Figure 3: Diamond symbols representing the two primary types of process relationships: Synchronization and Mutex.

The problem-solving workflow involves two phases: Abstracting Entities and Clarifying Relationships. This is followed by a rigorous translation into code, ensuring that wait() and signal() primitives are correctly paired and ordered to prevent deadlocks.

Application: The Producer-Consumer Problem

The effectiveness of this method is best demonstrated through the classic Producer-Consumer scenario. In this problem, producers add items to a buffer while consumers remove them, requiring both mutual exclusion (for buffer access) and synchronization (to handle full/empty states).

Figure 5: A complete modified E-R diagram for the Producer-Consumer problem, illustrating the interplay between process entities, synchronization relationships, and semaphores.

As shown in Figure 5, the complex constraints of the buffer pool are distilled into a single, intuitive diagram. This visualization allows students to see the "invisible" constraints of the system before writing a single line of code.

Key Insights and Pedagogical Impact

The primary "aha moment" for students using this framework is the realization that synchronization logic is essentially a set of structured relationships. Key pedagogical insights include:

  1. The "Synchronization First" Rule: The diagram helps reinforce that when mutual exclusion and synchronization coexist, the synchronization wait() must precede the mutex wait() to avoid deadlocks.
  2. Primitive Pairing: The method visually reinforces that wait() and signal() must occur in pairs—within the same process for mutual exclusion, and across different processes for synchronization.
  3. Standardization: By providing a repeatable engineering process, the method moves away from individual intuition toward a standardized design practice.

Conclusion and Future Work

While qualitative feedback from teaching practice is highly positive, showing improved student mastery of synchronization design, the study currently lacks quantitative comparative data. Future research could involve controlled studies to measure performance gains and explore how this visual methodology scales to modern concurrency challenges like distributed systems or lock-free programming. Nonetheless, the modified E-R diagram serves as a powerful tool for demystifying one of the most abstract topics in operating systems.

Summary updated

Abstract

In the teaching process of the course of operating systems, process synchronization is both a key and the biggest difficulty. This paper, through transforming the definition of E-R diagram in database, proposes process synchronization teaching method for computer operating systems based on modified E-R diagram. The method formulates process entities in rectangles, among which a diamond indicates links between entities and an oval represents the semaphore that generates association; thus able to clear reveal the connection between process entities as well as that within the entity. Teaching practice shows that this method is not only advantageous to the description and analysis of the process synchronization problem, but also helpful for students to master the ideas of process synchronization design. In addition, it can improve their ability to solve the problems related to process synchronization.
BibTeX
@inproceedings{wang2015research,
  author = {Jiuru Wang and Lihua Han and Xiaojie Wang and Yulong Zuo},
  title = {{Research on the Teaching Method of Process Synchronization of Computer Operating Systems}},
  booktitle = {Advances},
  year = {2015},
  doi = {10.2991/iccse-15.2015.68},
}
Figure