DragonflyRobotics / DragonflyRobotics/MAGIST-Algorithm

A Multi-Processing and Multi-Threading Manager

Đang mở
#10 0 bình luận 0 reaction 1 người được giao Được @DragonflyRobotics nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
5
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Problem and Solution Description**
Right now, MAGIST occupies only 2 threads, namely the main thread and the daemon thread. This is problematic when the AI is simultaneously training and processing data. This makes it nearly impossible to run without major improvements. If we had a manager that can assign tasks to all the threads across all cores in the system, it could run faster and more efficiently.

**Detailed Description**
Multi-threading and Multi-processing managers can be used to resolve this. In this, there would be a multiprocessing pool that would take tasks and assign them to a core manager. Each core manager takes the tasks and assigns them to a thread. This way, we get complete resource utilization. However, Python's GIL(Global Interpreter Lock) makes it arduous to implement.

**Alternatives**
A much simpler idea would be to implement a second worker node in the PriorityQueue class. If we add a second `__worker` function to the `PriorityQueue` class as well as a manager to automatically distribute tasks once they are published, we can have more processes running with faster and more efficient execution. This also resolves the issue described in #9 .

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.