Programacion En C Ascensor Usando Threads/ Project Elevators Using Threads In C Programming -- 2

€ 8.00 — 30.00 EUR
Hi I have to do a work in C.

The aim is to develop software that manages the operation of elevators in a building.
In this case, the
Brotherhood has bought a new building with ten floors (identified with values ​​between 0 and 9), and two elevators (identified with values ​​between 0 and 1) for your new guild house.
On each floor, there is a
single button to request a lift.
If all the elevators are busy, the request is put on hold, creating a queue system. until one of the elevators is free and can go to pick up the person in question.
Also, suppose there will never be any more of a request to an elevator simultaneously from the same floor.

Make a software using threads that intelligently manages the operation of this new sorority house
taking into account that there will be m people who want to request an elevator and that there are two elevators in this building.
The number of people will be entered in a variable at the beginning of the program.
The number of elevators in the building will be defined by a constant.
• If necessary, use semaphores to synchronize the multiple threads listed in this problem.
• The amount of time an elevator takes for each floor is 1 second. will not be taken into account
amount of time it takes for a person to enter or exit the elevator.
• Each person will take an elevator only once and only one person can be found in an elevator
at once.
• It is not necessary that the program ends when all the people have finished taking their elevator.
• The target plant for each person will be a random number.
To generate this number you can use
the rand() function, and the number must be between the interval .
If the random number
matches the floor number the person is on, this value must be recalculated until
that this is different from the value of the plant where the person is.
• Each person is initially located on a random floor of the building.
To do this, also use the
rand() function cited in the previous point.
• All elevators will initially depart from the first floor of the building.

An example of execution of the system where there are 5 people and 2 elevators is the following:
Person 2 is on floor 1.

Person 1 is on floor 4.

Person 4 is located on floor 3.

Person 0 is on floor 1.

Person 3 is on the 9th floor.

Person 4 requests an elevator from floor 3.

Elevator 0 is coming to pick up Person 4.

Person 0 requests an elevator from floor 1.

Elevator 1 is coming to pick up Person 0.

Person 3 requests an elevator from the 9th floor.

Person 0 has accessed Elevator 1 and requests to move to floor 8.

Elevator 1 is moving to floor 8.

Person 1 requests an elevator from floor 4.

Person 2 requests an elevator from floor 1.

Person 4 has accessed Elevator 0 and requests to move to floor 0.

Elevator 0 is moving to floor 0.

Elevator 0 has reached floor 0.

Person 4 exits the elevator and see you later.

Elevator 0 is coming to pick up Person 3.

Elevator 1 has reached floor 8.

Person 0 exits the elevator and see you later.

Elevator 1 is coming to pick up Person 1.

Person 1 has accessed Elevator 1 and requests to move to Floor 1.

Elevator 1 is moving to floor 1.

Person 3 has accessed Elevator 0 and requests to move to floor 0.

Elevator 0 is moving to floor 0
I have to do this before 18th

Similar Freelance jobs:

Linux Distro
Hi everyone! I'm looking for a embedded systems engineer someone with vast knowledge on C++, QT, Kirigami UI Framework, Maui Project Framework these frameworks and knowledge in this language would be of great help in my creation a device I'm engineering. Other important areas of expertise: KDE Plasma, Calamares Installer, Kubuntu Invite will need to sign NDA. Thank you!
Full Description of Linux Distro
Build Me A Fast Proof Of Stake Cryptocurrency
I am looking for an expert at creating cryptocurrencies to develop a fast Proof of Stake cryptocurrency using its own customized network like EOS and XRP. This means that the transaction time between receiving and sending the crypto should be about 5 seconds. I will provide more information about the project in private with whoever is interested in taking on this job.
Full Description of Build me a fast Proof of Stake Cryptocurrency
Stm32 Gui Touchgfx
Realization of a demonstrator on ST STM32F769I-DISCO board (4'' 480x800). STM32Cube - FreeRTOS – TouchGFX The application is defined (screens, sequences to screen or function). Reading one sensors on usart and other messages on canbus (defined messages). Show informations on GUI. Sending messages on canbus (defined messages). Save user's parameters in flash. Source full project Stm32Cube/gfx to deliver. Option: add bootloader IAP on USB to allow the program update (there are 2 flash banks of 1MB. Application is less than…
Full Description of STM32 GUI TouchGFX
Software Designing
I need a good and efficient software which should be helpful and I can get a good rate of selling it.
Full Description of Software designing
Expert In Python And Raspberry Pi
I am looking for an expert in Python and raspberry pi, I have code ready and written in Python required some maintenance, suffering from latency while processing the data and send to the cloud. If you feel you can do this job please contact me.
Full Description of Expert in Python and raspberry pi
© 2006 — 2026 hirelancer.com is an affiliate website, listing the freelance projects. We are collaborating with other sites like getFreelancer.com. Feel free to bid on any project and good luck! You will need register first, before bidding or posting projects. Basic memberhsip is always free. We might earn commissions from referring you. You will never ever pay additional fees for we referred you.