|
| 1 | +--- |
| 2 | +title: OVERHAULING SCHEDULER DESIGN (Discussion) |
| 3 | +author: Aaditya Singh |
| 4 | +--- |
| 5 | +<!-- |
| 6 | +SPDX-License-Identifier: CC-BY-SA-4.0 |
| 7 | +SPDX-FileCopyrightText: 2024 Aaditya Singh <singh.aaditya889@gmail.com> |
| 8 | +--> |
| 9 | + |
| 10 | +# Meeting 6 |
| 11 | + |
| 12 | +*(May 31, 2024)* |
| 13 | + |
| 14 | +## Attendees |
| 15 | + |
| 16 | +- [Anupam Ghosh](https://github.com/ag4ums) |
| 17 | +- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd) |
| 18 | +- [Gaurav Mishra](https://github.com/GMishx) |
| 19 | +- [Kaushlendra Pratap](https://github.com/Kaushl2208) |
| 20 | +- [Aaditya Singh](https://github.com/Aaditya-Singh78) |
| 21 | + |
| 22 | +## Discussion |
| 23 | + |
| 24 | +### Contributor |
| 25 | + |
| 26 | +- [Aaditya Singh](https://github.com/Aaditya-Singh78): Focused on framing the current scheduler by studying the Job Scheduler `wiki` [Documentation](https://github.com/fossology/fossology/wiki/Job-Scheduler). |
| 27 | + |
| 28 | +#### Current Scheduler Design |
| 29 | + |
| 30 | +The schematic from the documentation provides an architectural overview of the current Job Scheduler: |
| 31 | +<!-- change it! --> |
| 32 | + |
| 33 | + |
| 34 | +**Architectural Overview:** |
| 35 | + |
| 36 | +The design is based on a client-server model, featuring: |
| 37 | + |
| 38 | +1. **Scheduler Port**: Serves as the communication hub between clients and the scheduler. |
| 39 | +2. **Main Thread**: Responsible for job queuing, allocation, and event management. |
| 40 | +3. **Worker Threads**: Implement specific tasks asynchronously, enhancing throughput and response times. |
| 41 | + |
| 42 | +**Key Components:** |
| 43 | + |
| 44 | +1. **Scheduler**: Manages all job scheduling operations and acts as the primary interface for job requests. |
| 45 | +2. **Asynchronous Workers**: Improve processing time by handling tasks in parallel. |
| 46 | +3. **Logging and Monitoring**: Provides integrated systems for real-time monitoring and issue troubleshooting. |
| 47 | + |
| 48 | +### Alignment with Documentation |
| 49 | + |
| 50 | +**Mentor:** |
| 51 | +- [Gaurav Mishra](https://github.com/GMishx): Confirmed alignment with the current architecture of the job scheduler. |
| 52 | + |
| 53 | +#### New Scheduler Design |
| 54 | + |
| 55 | +The revised design focuses on a more efficient multithreaded approach: |
| 56 | +<!-- change it! --> |
| 57 | + |
| 58 | + |
| 59 | +**Architectural Overview:** |
| 60 | + |
| 61 | +1. **Main Thread**: Coordinates with various components and manages task execution. |
| 62 | +2. **Worker Thread**: Manages interactions between different services to prevent conflicts. |
| 63 | +3. **Event Queue**: Ensures proper handling of system-level events and error logging. |
| 64 | + |
| 65 | +**Key Components:** |
| 66 | + |
| 67 | +1. **Scheduler**: Uses a round-robin technique to manage tasks, ensuring efficient CPU time distribution. |
| 68 | +2. **Queue Storage**: Manages tasks dynamically to adapt to workload changes. |
| 69 | + |
| 70 | +#### Trade-offs |
| 71 | + |
| 72 | +| Feature | Old Job Scheduler | New Job Scheduler | |
| 73 | +|-----------------------|----------------------|----------------------| |
| 74 | +| Maintainability | Easier | More challenging | |
| 75 | +| Monitoring | Centralized | Decentralized | |
| 76 | +| Resource Management | Static | Dynamic | |
| 77 | + |
| 78 | +### Effectiveness of New Design |
| 79 | + |
| 80 | +**Mentor:** |
| 81 | +- [Gaurav Mishra](https://github.com/GMishx): Suggests a finite state machine architecture might be more suitable given the complexity, as it facilitates easier tracking and management. |
| 82 | + |
| 83 | +### Addressing FOSSology Issue |
| 84 | + |
| 85 | +**[#2742](https://github.com/fossology/fossology/issues/2742)**: Problem with incorrect MIME type recognition for text files. |
| 86 | + |
| 87 | +**Mentor:** |
| 88 | +- [Shaheem Azmal M MD](https://github.com/shaheemazmalmmd): Error found due to the "Ignore SCM files" option affecting MIME type recognition. |
| 89 | + |
| 90 | +### Wfx Project Approach |
| 91 | + |
| 92 | +**Mentor:** |
| 93 | + - [Kaushlendra Pratap](https://github.com/Kaushl2208): Expressed interest in holding an internal discussion about the [wfx](https://github.com/siemens/wfx) project approach. |
| 94 | + |
| 95 | +### Goals for the Week |
| 96 | + |
| 97 | +**Contributor:** |
| 98 | +- [Aaditya Singh](https://github.com/Aaditya-Singh78): Goals include rewriting the existing C code to Go and implementing a queue in Golang. |
0 commit comments