From 49763097a39d76c714f966ffa739ee3a2e44af41 Mon Sep 17 00:00:00 2001 From: abregman Date: Mon, 2 Dec 2019 11:48:52 +0200 Subject: [PATCH] Add two questions - killing a zombie and tail implementation --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d161424..e127814 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ :information_source:  This repository contains interview questions on various DevOps and SRE related topics -:bar_chart:  There are currently **551** questions +:bar_chart:  There are currently **553** questions :books:  To learn more about DevOps check the resources in [DevOpsBit.com](https://devopsbit.com) @@ -1156,7 +1156,17 @@ Zombie
-What is a zombie process? How do you get rid of it? +What is a zombie process?
+
+ +
+How to get rid of zombie processes?
+ +You can't kill a zombie process the regular way with `kill -9` for example as it's already dead. + +One way to kill zombie process is by sending SIGCHLD to the parent process telling it to terminate its child processes. This might not work if the parent process wasn't programmed properly. The invocation is `kill -s SIGCHLD [parent_pid]` + +You can also try closing/terminating the parent process. This will make the zombie process a child of init (1) which does periodic cleanups and will at some point clean up the zombie process.
@@ -2738,6 +2748,10 @@ a = f() Can you implement Linked List in Python?
+
+Can you implement Linux's tail command in Python? Bonus: implement head as well
+
+
You have created a web page where a user can upload a document. But the function which reads the uploaded files, runs for a long time, based on the document size and user has to wait for the read operation to complete before he/she can continue using the web site. How can you overcome this?