กลับมาอีกครั้งนะครับ วันนี้เราจะมาพูดถึงหนึ่งในฟังก์ชันของระบบปฏิบัติการ นั้นก็คือ Process Management การจัดการโพรเซสกันนะครับ <ถ้าผิดพลาดประการใดก็ขออภัยด้วยนะครับ>
Process Management (การจัดการโพรเซส) คือ กลุ่มของคำสั่งที่รวบรวมไว้เพื่อให้ระบบคอมพิวเตอร์ทำงานทํางานอันใดอันหนึ่ง
ในการทำ Process Management จะมีการประมวลผลในความจำหลักและมีข้อมูลอยู่ภายในของหน่วยความจำเราจะเรียกว่า “ โพรเซส “
โพรเซส จะมีการทำงานอยู่หลากหลายรูปแบบ เช่น
- Program counter — การนับจำนวน
- Stack — การเก็บข้อมูลแบบสแตก
- Data section — การคัดเลือกข้อมูล
สถานะกระบวนการ (Diagram of Process State)
คือ ขบวนการในการโพรเซสที่มีการเปลี่ยนแปลงสถานะมี 5 สถานะ
1.) New — สถานะสร้างใหม่
2.) Running — สถานะทำงานตามที่ได้มา
3.) Waiting — สถานะรอ หรือ พักงานเพื่อรอส่งต่อไป Ready
4.) Ready — สถานะเตรียมพร้อมเพื่อรอส่งไปทำงานที่ Running
5.) Terminate — สถานะเสร็จสิ้นการทำงาน และคืนทรัพยากร
�ٻẺ��õ��������������ŵ���������
1. �ٻẺ������� (Common Buses)
2. �ٻẺ˹��¤����ӷ�������¾��� (Multiport Memory)
3. �ٻẺ����������ͼ�ҹ�Թ�ص/��ҵ�ص (Connect through I/O)
4. �ٻẺ����Թ��� (Bus Windows)3.9 ��Ժѵԡ�ý֡��¹Ἱ�Ҿ- �֡��¹Ἱ�Ҿ��÷ӧҹ�ͧ����
- �֡��Ǩ�ͺ���ʷ����ѧ�����ż�㹤�������������к���Ժѵԡ�õ�ҧ �
- �鹤��Ң���������ǡѺ ��èѴ������� �ҡ�Թ������ ���Ƿ���§ҹ ����觵��᷹���ʹ�˹�Ҫ�����¹Blog : ��������ͧ��÷ӧҹ�ͧ���� [10]����������˹�ҷ����ͧ��÷ӧҹ�ͧ���� (Process) �ʴ� 1) Running, 2) Ready ��� 3) Waiting � Process Manager ��С�èͧ˹��¤������ Memory Manager ���������ö���ҧ���� (Process) ����� ����������к� (System) ����繡�÷ӧҹ����� State ������ҧ Process ������� 3 Ẻ
�������ͧ Process �մѧ���
1. CPU = �� Central Processing Unit ���ҧ����
2. IO = �� CPU ���ͧ ���� IO ����ѡ ������Ẻ
3. MIX = �� CPU �ҹ��ҧ 仾�����Ѻ IO
�.�. 1 ��������
[���ҧ]
Process Ẻ CPU
Priority = 0, Max. frames =5
[��]
�� Process ���� ����Ѻ��������ҧ
Ready ��� Running
�������ͧ��Ҥ�ǡѺ�� �֧������ Ready = 0 ����
[��ҧ Process �͡]
��� Process, Select, Delete
������� Run ����о������������������ Processor Manager�Ԩ���� : �Ѵ��� task1. DOS> tasklist | more
����ª��ͧҹ ��� PID ��� ˹��¤����Ӣͧ���Чҹ
��� Session Name ����� console ������ Services
2. DOS> tasklist /? ���� tasklist /M
����ª��� module ��� image name
�� cmd.exe ��� image name �� PID ��� 1234
��� Modules ��Сͺ����
ntdll.dll, kernel32.dll, kernelbase.dll, msvert.dll ��� winbrand.dll
3. DOS> tasklist /M /FI "imagename eq cmd.exe"
���͡�ʴ������ŵ�� imagename
4. DOS> notepad
����Դ task ���� notepad
dos> tasklist /M /FI "imagename eq notepad.exe"
�ҡ�Դ���¤��駡���� pid ���µ���Ţ �� 6860
5. DOS>taskkill /PID 6860
�� SUCCESS: Sent termination signal to the process with PID 6860.
���;� ERROR: The process "6860" not found.
+ //ss64.com/nt/taskkill.html
+ //www.thaiall.com/assembly/internalcmd.htm
+ //www.thaiall.com/os/os03.htm��� - �ͺ��ǹ˹�����º���§�ҡ˹ѧ��ͧ͢ ��.��.��ɴ� �ѹ��ԡ������ʶҹТͧ���� �ա��ʶҹ� �����ú�ҧ�ͺ�� 5 ʶҹ�
1. Start
2. Ready
3. Running
4. Waiting
5. Terminated����������ç���ҧ������ ���� Process Control Block (PCB) ���� Process Descriptor �����ú�ҧ�ͺ1. Process Identification (PID)
2. Process status
3. Program counter
4. Process priority
5. Pointer
6. Execution context ���� Register contents
7. Accounting
8. Memory information
9. Open files���ͧ���Сͺ�ͧ���� �� 6 ��ǹ ���ú�ҧ�ͺ1. �����Ţ���� (Process id)
2. ������� (Program code)
3. ������ (Data)
4. ���͡�Ǻ������� (PCB : Process control block)
5. �����ʶҹ������ (PSW : Program Status Word)
6. �س���ѵԢͧ���� (Properties of process)����ٻẺ��û����żŢͧ�������� ���ִ��ѡ�����Ţͧ�ش����� (Instruction Stream) ��С����Ţͧ�ش������ (Data Stream) �� 4 �ٻẺ �����ú�ҧ (���� ����ʡ������ p.293 )�ͺ1. ���������� ��Т���������� (Single Instruction Single Data : SISD)
2. ���������� ������ªش������ (Single Instruction Multiple Data : SIMD)
3. ���ªش�������Т���������� (Multiple Instruction Single Data : MISD)
4. ���ªش�����������ªش������ (Multiple Instruction Multiple Data : MIMD)�й����䫵� (Website guide)+ //www.cs.nott.ac.uk/~gxk/courses/g53ops
+ //www.training.com.br/sosim/indexen.htm
�͡�����ҧ�ԧ (Reference)[1] Abraham silverschatz, Peter baer galvin, "Operating system concept", John wiley & Sons, New York, 2003.
[2] Milan Milenkovic, "Operating systems: concepts and design", McGraw-Hill inc., New York, 1992.
[3] William stallings, "Operating system", Prentice hall, New York, 1999.
[4] ���� ����ʡ������ ��Ф��, "�к���Ժѵԡ��", �ӹѡ�����ǧ�������, ��ا�, 2545.
[5] ���ɰ� �����ѵ����š��, "�к���Ժѵԡ�� (Operating system)", ����ѷ �������प�� �ӡѴ., ��ا�, 2546.
[6] ��.���§ ���ӹ��, "�к���Ժѵԡ�� (Operating system)", ����ѷ �������प�� �ӡѴ., ��ا�, 2541.
[7] ��Ъ� �ġ�������, "�к���Ժѵԡ��", ����ѷ �Ѥ�� ����� �ӡѴ., ��ا�, 2549.
[8] ��Թ ������Ѿ��, "������ MS-DOS", ��.���.��þ����, ��ا�, 2545.
[9] ��Թ��� ����Ե�, "�������ٹԡ���ʡ�ͻ", ����ѷ �������प�� �ӡѴ., ��ا�, 2538.
[10] ��.��.��ɴ� �ѹ��ԡ���, "�к���Ժѵԡ�� (Operating Systems)", �ҧ�ǹ��þ����, ������ä�, 2555.