kthread Framework