implementation of os_akill, masks are checked and killed if they match