This Project is in Operating Bystem Base Project. In this Project, I implement Intelligent traffic light system by using c++ language. where cars arrive at a "one-way only" tunnel. Only at most “N” cars in one direction can go through the tunnel at a time. Lights can be RED or GREEN only. If the light turns RED, no car should attempt to enter the tunnel. Otherwise, N cars should be allowed to enter and leave the tunnel. I implement one thread per car. N threads need to be woken up when the light turns GREEN. I use sleep(2) function. We pass M total car as from terminal and pass N how many cars we pass when signal is GREEN.
-
Notifications
You must be signed in to change notification settings - Fork 0
In this Project, I implement Intelligent traffic light system by using c++ language. where cars arrive at a "one-way only" tunnel. Only at most “N” cars in one direction can go through the tunnel at a time. Lights can be RED or GREEN only. If the light turns RED, no car should attempt to enter the tunnel. Otherwise, N cars should be allowed to e…
bilalshabbir31/Intelligent-traffic-light-system
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
In this Project, I implement Intelligent traffic light system by using c++ language. where cars arrive at a "one-way only" tunnel. Only at most “N” cars in one direction can go through the tunnel at a time. Lights can be RED or GREEN only. If the light turns RED, no car should attempt to enter the tunnel. Otherwise, N cars should be allowed to e…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published