Skip to content

Talhadeveloperr/Concurrency-Aware-School-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Concurrency-Safe School Management System

📌 Project Overview

This project is a C# Windows Forms–based School Management System designed with a strong focus on Operating System concepts, particularly concurrency control, race condition handling, deadlock prevention, and synchronization mechanisms.

The system demonstrates how real-world software systems can safely manage shared resources using Semaphores, Mutexes, and Monitors, ensuring data consistency and system reliability in a multi-threaded environment.


🎯 Objectives

  • Design a complete School Management System using C# Windows Forms
  • Identify and resolve race conditions in database operations
  • Prevent deadlocks during concurrent access
  • Implement OS synchronization techniques
  • Demonstrate practical usage of Semaphore, Mutex, and Monitor
  • Ensure thread-safe database transactions

🧠 Operating System Concepts Used

✔ Concurrency Problems Addressed

  • Race Conditions
  • Deadlocks
  • Critical Section conflicts
  • Resource starvation

✔ Synchronization Techniques Implemented

Technique Usage
Semaphore Controls access to limited shared resources
Mutex Ensures exclusive access to critical sections
Monitor (lock) Provides structured mutual exclusion
Transactions Ensures atomic database operations

🏫 System Modules

📚 Class Subjects Management

  • Prevents duplicate subject assignment
  • Handles concurrent insert/delete requests safely

👩‍🏫 Teacher Management

  • Thread-safe add, update, and delete operations
  • Cascading delete handled using transactions
  • Synchronization prevents inconsistent deletions

📘 Teacher Courses Assignment

  • Ensures one teacher per subject per class
  • Prevents race conditions during assignment

🧪 Student Results Management

  • Thread-safe result entry
  • Prevents duplicate grading records
  • Atomic calculation and insertion of results

🕒 Timetable Management

  • Prevents teacher scheduling conflicts
  • Ensures consistent slot allocation
  • Handles concurrent timetable updates safely

🔐 Critical Section Handling (Example)

lock (teacherLock)
{
    // Critical Section:
    // Check duplicate → Insert teacher
}

This ensures that only one thread can modify teacher records at a time, preventing race conditions.

🛠 Technologies Used Language: C#

Framework: .NET (Windows Forms)

Database: SQL Server

IDE: Visual Studio

Architecture: Layered (DAL + UI)

📂 Project Structure

School_Management_System/
│
├── DAL/
│   ├── TeacherDAL.cs
│   ├── StudentResultDAL.cs
│   ├── TimetableDAL.cs
│   ├── ClassSubjectsDAL.cs
│   └── TeacherCoursesDAL.cs
│
├── Models/
│   ├── Teacher.cs
│   ├── StudentResultclass.cs
│   ├── Timetableclass.cs
│   └── ...
│
├── Forms/
│   ├── TeacherForm.cs
│   ├── StudentResultForm.cs
│   ├── TimetableForm.cs
│   └── ...
│
├── DBConnection.cs
└── README.md

🚀 How to Run the Project Clone the repository:

git clone https://github.com/talhadeveloperr/ConcurrencySafe-School-Management-System.git

Open the solution in Visual Studio

Configure SQL Server connection string in DBConnection.cs

Restore database tables

Run the project

📊 Key Learning Outcomes Practical implementation of mutual exclusion

Real-world handling of deadlocks and race conditions

Understanding critical sections in database-driven applications

Applying OS theory to real software systems

📌 Future Enhancements Role-based authentication

Async database operations

Logging and monitoring for thread behavior

Performance benchmarking under heavy load

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages