#ifndef PROLIFICSCHEDULER_H   
#define PROLIFICSCHEDULER_H   

#include <vector>     
#include <sys/types.h> 
class ProlificScheduler {
private:  
        int total;              // συνολικές εργασίες (tasks)
        int levels;             // αριθμός workers
        pid_t root;             // pid της αρχικής διεργασίας
        std::vector<pid_t> pids; // αποθήκευση των παιδιών (child processes)
public:  
        ProlificScheduler(int total, int levels);

         void spawn_workers();   // δημιουργεί processes
         void distribute_work(); // μοιράζει δουλειά
         void reap_workers();    // περιμένει να τελειώσουν
         
                            };


void random_task(int id);


#endif  
