Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
COMP2432 Operating Systems Group Project I
SmartPark: A Smart Parking Management System for PolyU
Using OS-Level Process Coordination
Additionally, six essential facilities are offered in pairs to improve the overall user experience: (battery + cable), (lockers + umbrella), and (inflation service + valet parking). When a user reserves a battery, they automatically receive a cable as well. If a user reserves both a battery and a locker, they will be provided with a battery, cable, locker, and umbrella.
Currently, members of PolyU may simply make a reservation for a parking space or reserve only the parking facilities (essentials). For example, Member_A makes a reservation for parking space for their smart vehicle with a battery and charging cable. If they are both (parking + essentials) available, the reservation request is accepted. Otherwise, the reservation request is simply rejected. For instance, all the electric vehicle charging cable might have been booked by other members, so the request is rejected. In other words, the current system does not provide any alternative plan to satisfy or reschedule the reservation when some of the requested items or locations are not available for the requested time slot. Knowing that you have learned different scheduling methods from Operating Systems, the CFSO in PolyU is offering you a part-time job that you could use to satisfy your WIE. Would you mind helping CFSO at PolyU to revise its parking management system to achieve better utilization with an improved scheduling/rescheduling method? The goal is to improve the reservation situation so as to increase the PolyU’s revenue from renting these spaces to its members.
*** Note that we use only the “gcc” compiler to compile your program. In other words, if your program cannot be compiled by the “gcc” of department’s servers, apollo or apollo2, we simply treat this as a failed program.***
Project Requirements
|
Part I |
Develop a program that allows users to add details of a booking (name, parking slot number, date, time, duration, and/or calless etc.) to the schedule. Besides the standard line by line input approach, SPMS 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.
Note that the one who initiates for the booking is called the “client” or the “requester” and those others involved in the booking are called “staff”. This part of the program module is referred to as the Input Module. |
|
Part II |
Extend the program developed in Part I with a scheduler to generate timetables for all bookings (e.g. available parking spots, and members booking/reservation records). The scheduler will implement several scheduling algorithms similar to those covered in lectures. This is the called the Scheduling Kernel, within the Scheduling Module.
|
|
Part III |
Augment the program with the facilities to print booking schedule for available parking slots and related additional facilities and equipment in Part II. Those rejected bookings should all be included. This constitutes the Output Module.
|
|
Part IV |
Provide the program with the ability to generate a summary report to analyze the results produced in Part III. Compare the different schedules (generated from different algorithms) and find out which one would make the best use of the three parking slots. Your program should preferably be able to process N parking slots (N = 3 in the existing case) to cope with the expansion of PolyU in the near future. It should also be 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 be scheduled. This final module is the Analyzer Module.
|
|
Part V |
Augment the program SPMS to check whether or not the required facilities are available. If so, it assigns a priority on each booking. For example, if a parking is booked for a car and it should be equipped with a battery and charging cables, the battery and cables will be reserved for that booking with a higher priority. Even though the battery and charging cables have been reserved for another booking but without using a parking, i.e. someone reserves only the two pieces of equipment by that moment, the booking would be then rejected. Of course, you may have other assumptions on how the conflicting bookings 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 implemented using the C programming language and it must be successfully executed on ANY ONE of the Linux Servers (apollo or apollo2) in the Department of Computing. You may specify to us on which Linux server your project has been executed successfully.
Implementation
be input to the system
Command Syntax and Usage
|
To execute the program |
|
|
Syntax |
./SPMS |
|
Use |
Simply to enter [./SPMS] to start the program. |
|
Command |
addParking |
|
|
addParking -aaa YYYY-MM-DD hh:mm n.n bbb ccc;
e.g. addParking –member_A 2025-05-16 10:00 3.0 battery;
|
|
Use |
It is to add a booking for a parking place with certain essentials devices together. As in the
example, [member_A] is to make a booking on [May 16, 2025] at [10:00], and the duration
is [3.0] hours. In addition, it also requires a battery (battery) and a charging cable (cable).
[-aaa] – Member (of PolyU) 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 (2 digits).
[n.n] – Duration of the parking in hours (one decimal place)
[bbb] and [ccc] – Additional essentials to be required. (Optional, but should be in pair when
request, [battery]+[cables] or [locker]+[umbrella] or [InflationService] + [valetPark])
; – End of current input.
Note: SPMS would assign a parking space which fits the requirements. Of course, SPMS would
also check the availability of the required essentials (battery and cables). If all these are available,
the request would be accepted.
For [addParking], it is an optional choice to book any add-on essentials facilities.
PolyU Members may simply book a parking space only.
|
|
Command |
addReservation |
|
Syntax |
addReservation -aaa YYYY-MM-DD hh:mm n.n bbb ccc;
e.g. addReservation –member_B 2025-05-14 08:00 3.0 battery cable
|
|
Use |
Similar to [addParking], it is to make a booking for a reservation. As in the example, it is to
add a request made by [member_B] who would park his smart vehicle on [May 14, 2025] at
[08:00] for [3.0] hours long. And, there would be 2 essentials required by the member. In
addition, the parking available and should be equipped with [battery] and [cable].
[bbb] and [ccc] – Additional essentials are required (mandatorily include).
The use of parameters is same as the previous one.
|
|
Command |
addEvent |
|
Syntax |
addEvent -aaa YYYY-MM-DD hh:mm n.n bbb ccc ddd;
e.g. addEvent –member_E 2025-05-16 14:00 2.0 locker umbrella
valetpark;
|
|
Use |
It is same as [addReservation] but it would have a higher priority if you are to use the algorithm
“priority”. As in the example, [Member_E] is to add a booking for a event on [May 16, 2025]
at [14:00] for [2.0]hours long. The parking slot should be equipped with [umbrella], and
[valetpark].
The use of parameters is same as the previous one.
|
|
Command |
bookEssentials |
|
Syntax |
bookEssentials -aaa YYYY-MM-DD hh:mm n.n bbb
e.g. bookEssentials –member_C 2025-05-011 13:00 4.0 battery;
|
|
Use |
It is simply to reserve a specific essential only. As in the example, it is to reserve for
[battery_100kWh] on [May 11, 2025] at [13:00] for [4.0] hours long. That
request is made by [member_C].
|
|
Command |
addBatch |
|
Syntax |
addBatch -xxxxx
e.g. addBatch –batch001.dat
|
|
Use |
It is to read in a batch file, batch001.dat which is a plain text document and records one or more booking requests. |
|
Command |
printBookings |
|
Syntax |
printBookings –xxx –[fcfs/prio/opti/ALL]
e.g. printBookings –fcfs
|
|
Use |
It is to print the schedule (Accepted and Rejected) for users. In addition, a “Performance Report” is needed if [ALL] is used. The Performance Report is a summary of how many bookings are received and allocated, and how many are rejected in total that based on the algorithm used. Where;
[fcfs/prio/opti/ALL] – Algorithms that would be used (just a reference).
[fcfs] – First Come First Served
[prio] – Priority
[opti] – Optimized
[ALL] – All algorithms being used in the application and the performance
In the example, the “FCFS” is used. That is the first booking would be allocated to a time slot that other late requests which request the same time slot would just be rejected.
For “Priority”, where the one has a higher priority rank can take over the time slot (see assumptions below). That is, for example, a “event” can replace an occupied time slot which has been assigned to a “Parking”. In this context, "event" pertains to making a reservation for an occasion, such as a conference, while "parking" refers to securing a spot for parking, for instance, during a meeting.
For “Optimized”, actually there are different methods to produce an optimized result. Here, in a simple word, it is to reschedule those rejected appointments. Then, there would be a better performance to utilize the facilities in PolySPMS. In the other words, this part would be considered as the “bonus”.
|
|
Command |
endProgram |
|
Syntax |
endProgram; |
|
Use |
This simply ends the program completely,
upon collecting all the child processes and closing all the files.
|
➢ five members – member_A, member_B, member_C, member_D and member_E;➢ three lockers➢ three umbrellas➢ three batteries➢ three cables➢ three valet parking➢ three inflation services
The second part is to have another video (3 to 5 minutes) to show the execution of the application based on data that we provide. A newer set of reports of the running results should be submitted to the Blackboard once again (detailswould be provided later through the Blackboard). If your application cannot run the provided data normally orsuccessfully, you are allowed to correct your application within a grace period. The modified source code should besubmitted to the Blackboard again. In addition, you should let us know what error(s) you have encountered and howyou fix the problem.