Star Cineplex is the first multiplex cinema

Star Cineplex is the first multiplex cinema theatre in Bangladesh. It also gives its viewers
the facility to check available tickets and book shows via online ticket booking system.
When the program is run, it creates a certain number of threads that attempt to sell all
available tickets. However, the program needs to make sure that while booking the same
show by various users, the total number of available seats are error free and there is not
any data loss.
Using POSIX threads, mutex locks, and semaphores implement a solution that
synchronizes the activities of the users. The total number of users, the number of tickets,
and number of shows are passed as command line arguments. Once a user thread
finishes booking a show, it should terminate. Once all the user threads are terminated,
the main program should be terminated. Your program should work for any number of
users, tickets and shows. Allocate memory for data structures dynamically based on the
input parameter(s).