-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#533] top을 통해 살펴보는 프로세스 정보 #542
Conversation
|
||
### cf) 프로세스 상태 코드 | ||
|
||
![](https://images.velog.io/images/sandartchip/post/abae3b5d-99d8-484e-aa24-d4fbe10176be/image.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실행 가능한
과 중지시킬 수 있는
의 차이가 어떻게 될까요?
|
||
|
||
#### 좀비 프로세스가 되는 경우 | ||
![](https://images.velog.io/images/sandartchip/post/e36cd50f-8c99-480e-b48d-cbdc46a0d59d/image.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅠㅠㅠ
- 그렇다면 Z 상태는 어떤 경우에 발생할까? | ||
모든 프로세스는 fork()를 통해서 만들어지기 때문에 부모와 자식 관계가 되고, 보통 부모 프로세스는 자식이 완료될 때까지 기다리게 된다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
z 상태는 그럼 부모 프로세스에게 할당되는 상태인가요? 자식이 D 나 S 상태일 때 부모 프로세스는 Z 상태라고 이해하면 될까요?
SHR의 구체적인 예에는 라이브러리가 있다. | ||
대부분의 리눅스 프로세스들은 glibc라는 라이브러리를 참조하기 때문에 사용하는 프로세스마다 glibc의 내용을 메모리에 올려서 사용하는 것은 공간 낭비다. | ||
|
||
커널은 이런 경우를 대비해서 공유 메모리라는 개념을 도입했고, 다수의 프로세스가 함께 사용하는 라이브러리는 공유 메모리 영역에 올려서 함께 사용하도록 구현했다. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
커널은 공유 메모리 영역을 사용하고, 여기에 올라가는 대표적인 라이브러리가 glibc 라고 구체적으로 명시하는것도 좋을 것 같아요! 저같이 리눅스를 잘 모르는 사람은 glibc 후에 공유 메모리가 나오는 시점에서 둘 사이의 관계를 유추해서 해석해야 해서요
@@ -0,0 +1,65 @@ | |||
리눅스에는 시스템의 상태를 살펴볼 수 있는 다양한 명령이 있다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
재미있게 읽었습니다! 리눅스에 대해서는 학부때 배운 기억이 전부인데, 이번에 써주신 글을 읽으며 새로운 정보를 얻었습니다~
그런데 왜 문제가 될까? 바로 좀비 프로세스가 점유하고 있는 PID 때문이다. | ||
좀비 프로세스가 사용한 PID가 정리되지 않고 쌓이면 새로운 프로세스에 할당할 PID가 모자라게 되고, 이는 결국 더이상 PID를 할당하지 못하는 고갈상태를 일으킬 수 있다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리나님 글 잘 읽었습니다!! process.exit()로 서버를 껐다고 하더라도 Process ID를 가진 좀비가 남아있으니 확실히 kill 해주는 것이군요..🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 분들이 너무 잘 이야기 해주셨네요 ㅎㅎ
제가 남기고 싶지만... 다른 분들이 너무 잘 적어주셨어요 ㅎㅎ
점점 발전해 나가는 포스팅 너무 좋습니다 👍
다음주 주제 기대하겠습니다~ ㅎㅎ
수고하셨어요 :)
|
||
top명령은 옵션없이 입력하면 주어진 Interval(기본 3초)으로 화면을 갱신하면서 정보를 보여준다. | ||
|
||
![](https://images.velog.io/images/sandartchip/post/326e5119-7902-48ec-b543-9bd0ec1d206b/image.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이번 발표에 논란의 사진이네요 :) ㅎㅎㅎ
다음 발표 기대하겠습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋ 리나님 덕분에 또 잘못알고 있던 개념을 다시 잡았습니당! 감사합니다! 😁
#533
편하게 보기