how kernel distinguishes between thread and process

NoSuchKey