1COMP2432 Group Project (2020/2021 Semester 2)Submission deadline: April 23, 2021 (revised)Weighting: 15%Project title: Room Booking Manager (RBM)ScenarioPolySME Business Center is a company, which supports the concept of shared offices andprovides office facilities to small business companies, especially those one-man companies. Thecompany offers general office facilities such as telephone lines, fax lines, LAN/Wi-Fi network,meeting rooms, etc. PolySME finds that there is a problem with its current meeting roombooking system designed 10 years ago. It is not flexible enough to make good utilization of themeeting rooms and to satisfy most requests from its tenants. In PolySME, there are three meetingrooms in use currently. The three rooms are in different sizes; two are small, allowing 10 persons(at most) and the third one is the largest, capable of holding 20 persons (at most) in a meeting. Inaddition, PolySME provides add-on/special facilities for each meeting room, for example,projector + screen for presentation/meeting use, or webcam + monitors for online conferences ormeetings, to be set up in the rooms on demand. Furthermore, such additional facilities come withdifferent configurations. For example, different projects/webcams support different resolutions,and the screens may be in different sizes. Currently, tenants of PolySME may simply make abooking of a meeting room or book a room equipped with special facilities or reserve only themeeting facilities. For example, Tenant_A makes a booking for a meeting room for 8 personswith a projector projector_2K with a screen screen_100. If there are both the availabilities ofthe room and the required facilities, the booking request is accepted. Otherwise, the bookingrequest is simply rejected. For instance, all the projectors of type projector_2K might have beenbooked by other tenants so that the request is rejected. In the other words, that means the currentsystem does not provide any alternative plan to satisfy or reschedule the booking when some ofthe requested item or location is not available for the requested time slot.Knowing that you have learnt different scheduling methods from Operating Systems, the managerin PolySME is offering you a part-time job that you could use to satisfy your WIE. Would youmind to help PolySME to revise its room booking system to achieve a better utilization with animproved scheduling/rescheduling method? The goal is to improve the booking situation so as toincrease company’s revenue on renting these to its tenants.Project RequirementsIn this project, you will be given an opportunity to apply the theory of process scheduling youhave learnt from COMP2432 to a daily-life scenario and produce the Room Booking Manager(RBM). The project consists of the following parts: Part 1.Develop a program that allows users to add details of a booking (date, time, duration,and/or callees etc.) to the schedule. Besides the standard line by line input approach, RBM should be able to read in batch files which containing the booking requests, i.e.one or more than one booking requests are stored in such batch files.2Note that the one who initiates for the booking is called the “user” or the “caller” andthose others involved in the booking are called “callees”. This part of the programmodule is referred to as the Input Module. Part 2.Extend the program developed in Part 1 with a scheduler to generate timetables for allbookings (e.g. meeting room booking schedule and tenant booking records).The scheduler will implement several scheduling algorithms similar to those covered inlectures. This is the called the Scheduling Kernel, within the Scheduling Module.Part 3. Augment the program with the facilities to print booking schedule for meeting roomsand related devices in Part 2. Those rejected bookings should all be included. Thisconstitutes the Output Module.Part 4. Provide the program with the ability to generate a summary report to analyze the resultsproduced in Part 3. Compare the different schedules (generated from differentalgorithms) and find out which one would make the best use of the three meeting rooms.Your program should preferably be able to process N meeting rooms (N = 3 in theexisting case) to cope with the expansion of PolySME in the near future. It should alsobe preferably able to handle more resource types in future. By the way, an outstanding(rejected) list may also be included in this report for those requests that cannot bescheduled. This final module is the Analyzer Module.Part 5. Augment the program RBM to check whether or not the required facilities are available.If so, it assigns a priority on each booking. For example, if a room is booked for apresentation and should be equipped with projector and screen, the projector and screenwill be reserved for that booking with a higher priority. Even though the projector andscreen have been reserved for another booking but without using a meeting room, i.e.someone reserves only the two pieces of equipment by that moment, the booking wouldbe then rejected. Of course, you may have other assumptions on how the conflictingbookings are being scheduled/rescheduled, and the associated priority.You must form a group of 4 persons (at most) for the project. The project must be implementedusing the C programming language and it must be successfully executed on ANY ONE of theLinux Servers (apollo or apollo2) in the Department of Computing. You may specify to us onwhich Linux server your project has been executed successfully.***** Note that we use only the “gcc” compiler to compile your program. In other words, ifyour program cannot be compiled by the “gcc” of department’s servers, apollo orapollo2, we simply treat this as a failed program.3ImplementationUser InterfaceFirst of all, your program should provide an interface to allow the user to input the details ofbookings and/or commands for the application. There are several input methods to be acceptedby the system, and the system should be able to store all requests (valid and invalid). Below is anexample of some inputs and outputs on a screen for reference../RBM~~ WELCOME TO PolySME ~~Please enter booking:addMeeting –tenant_A 2021-05-10 09:00 2.0 8;-> [Pending]Please enter booking:addPresentation –tenant_B 2021-05-14 08:00 3.0 12 projector_4K screen_150;-> [Pending]Please enter booking:bookDevice –tenant_B 2021-05-15 13:00 2.0 projector_2K;-> [Pending]…Please enter booking:addConference –tenant_E 2021-05-16 14:00 2.0 15 webcam_UHD monitor_75;-> [Pending]Please enter booking:addBatch –batch001.dat;-> [Pending]…Please enter booking:bookDevice –tenant_C 2021-05-011 13:00 2.0 projector_4K;-> [Pending]…Please enter booking:printBookings –fcfs;-> [Done!]Please enter booking:printBookings –prio;-> [Done!]…addBatch –batch099.dat;-> [Pending]…Please enter booking:addMeeting –tenant_A 2021-05-16 10:00 3.0 9 projector_2K screen_100;-> [Pending]… …Please enter booking:printBookings -ALL;-> [Done!]Please enter booking:endProgram;-> Bye!Some other requests wouldbe input into the system.Schedule is printed which isbased on the inputbookings up to thatmoment.4Command Syntax and Usage To execute the programSyntax./RBMUseSimply to enter [./RBM] to start the program. CommandaddMeetingSyntaxaddMeeting -aaa YYYY-MM-DD hh:mm n.n p bbb ccc;e.g. addMeeting –tenant_A 2021-05-16 10:00 3.0 9projector_2K screen_100;UseIt is to add a booking for a meeting room with certain devices together. As inthe example, [tenant_A] is to make a booking on [May 16, 2021] at[10:00], and the duration is [3.0] hours. In addition, it also requires aprojector (projector_2K) and a screen (screen_100).[-aaa] – Tenant who makes the request.[YYYY-MM-DD hh:mm] – Date and time of the event, YYYY:Year (4 digits),MM:Month (2 digits), DD:Day (2 digits), hh:Hour (2 digits) and mm:Minute (2digits).[n.n] – Duration of the appointment in hours (one decimal place)[p] – Number of persons to participate (integer)[bbb] and [ccc] – Additional devices to be required. (Optional, but shouldbe in pair when request, [projector]+[screen] or [webcam]+[monitor]); – End of current input.Note: RBM would assign a room which fits the requirements. For instance,RBM would assign either [room_A] or [room_B] since both are bigenough to hold the 9 participants. Of course, RBM would also checkthe availability of the required devices (projector and screen). If allthese are available, the request would be accepted.For [addMeeting], it is an optional choice to book any add-onfacilities. Tenants may simply book a meeting room only. CommandaddPresentationSyntaxaddPresentation -aaa YYYY-MM-DD hh:mm n.n p bbb ccc;e.g. addPresentation –tenant_B 2021-05-14 08:00 3.0 12projector_4K screen_150;UseSimilar to [addMeeting], it is to make a booking for a presentation. As inthe example, it is to add a request made by [tenant_B] who would conduct apresentation on [May 14, 2021] at [08:00] for [3.0] hours long. And,there would be 12 persons to take part in the presentation. In addition, theroom should be equipped with [project_4K] and [screen_150].[bbb] and [ccc] – Additional devices are required (mandatorily include).The use of parameters is same as the previous one. 5 CommandaddConferenceSyntaxaddConference -aaa YYYY-MM-DD hh:mm n.n p bbb ccc;e.g. addConference –tenant_E 2021-05-16 14:00 2.0 15webcam_UHD monitor_75;UseIt is same as [addPresentation] but it would have a higher priority if youare to use the algorithm “priority”. As in the example, [tenant_E] is to adda booking for a conference on [May 16, 2021] at [14:00] for [2.0]hours long. The room should be equipped with [webcab_UHD] and[monitor_75].The use of parameters is same as the previous one. CommandbookDeviceSyntaxbookDevice -aaa YYYY-MM-DD hh:mm n.n bbb;e.g. bookDevice –tenant_C 2021-05-011 13:00 4.0projector_4K;UseIt is simply to reserve a specific device only. As in the example, it is toreserve for [projector_4K] on [May 11, 2021] at [13:00] for [4.0]hours long. That request is made by [tenant_C]. CommandaddBatchSyntaxaddBatch –xxxxx;e.g. addBatch –batch001.dat;UseIt is to read in a batch file, batch001.dat which is a plain text documentand records one or more booking requests. CommandprintBookingsSyntaxprintBookings –xxx –[fcfs/prio/opti/ALL];e.g. printBookings –fcfs;UseIt is to print the schedule (Accepted and Rejected) for users. In addition, a“Performance Report” is needed if [ALL] is used. The Performance Report isa summary of how many bookings are received and allocated, and how manyare rejected in total that based on the algorithm used.Where–[fcfs/prio/opti/ALL] – Algorithms that would be used (just areference).[fcfs] – First Come First Served[prio] – Priority[opti] – Optimized[ALL] – All algorithms being used in the application and the performancesummary report. 6 In the example, the “First Come First Served” is used. That is the firstbooking would be allocated to a time slot that other late requests whichrequest the same time slot would just be rejected.For “Priority”, where the one has a higher priority rank can take over the timeslot (see assumptions below). That is, for example, a “conference” canreplace an occupied time slot which has been assigned to a “Meeting”.For “Optimized”, actually there are different methods to produce an optimizedresult. Here, in a simple word, it is to reschedule those rejected appointments.Then, there would be a better performance to utilize the facilities in PolySME.In the other word, this part would be considered as the “bonus”. CommandendProgramSyntaxendProgram;UseThis simply ends the program completely, upon collecting all the childprocesses and closing all the files. To ease your work, we make the following assumptions:1. Input formats follow the examples and make no difference and we simply assume all theinput formats are correct.2. Components in RBM are limited to the following: five tenants – tenant_A, tenant_B, tenant_C, tenant_D and tenant_E; three meeting rooms – room_A, room_B and room_C (room_A and room_B are ofthe small meeting rooms (
