Threads Management in Operating Systems