modularity + lock

i added an auxiliary function for assigning the threads their sections.

while we use getInputGen/getResGen we already lock the this object of
the section controller, there is no need to lock the field it self and
it might have caused deadlock

i changed the lock on the increaseInputGen/increaseResGen to lock the
this lock because i am not sure if u acquire the this lock u also
acquire it fields lock