This is described - for example - in Richard's and my book:
Book Announcement: SAP HANA Administration: 10.2 Processes and Threads.
There I explain how to monitor running threads on OS level.
However, there's no safe way to kill a running thread from the outside (that's true for any multi-threaded program). The OS just cannot know what the process was doing with the threads and just killing one of them would lead to a messed up situation of locks, memory and other resources.
However, for recent SAP HANA versions there are threads reserved for ADMIN users, so that you should always be able to create a new SQL session (e.g. via hdbsql or HANA studio). That way you can cancel running statements and trigger an end for long running threads.