> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/computer-operation-systems/linux-os-dev.-engineer/ipc/msg.-queue-programming.md).

# Msg. Queue Programming

<figure><img src="/files/p60Pa2MoCCm9BcsDnaNt" alt=""><figcaption><p>ประเภทการกลไกสื่อสาร IPC</p></figcaption></figure>

ระบบ System V และ POSIX IPC เป็นมาตราฐานที่แตกต่างกัน แต่ก็มีหลายส่วนที่มีการทำงานที่เหมือนกัน ซึ่งระบบ Unix System V ซึ่งจะเรียกสั้นๆกันว่า SysV แต่จะนิยมอ่านออกเสียงกันว่า “System Five” เป็นหนึ่งในรุ่นเชิงพาณิชย์รุ่นหนึ่งของระบบปฏิบัติการ UNIX ที่แรกเริ่มถูกพัฒนาโดย AT\&T (American Telephone & Telegraph) และได้ถูกปล่อยออกมาในปี ค.ศ. 1983

สำหรับระบบ POSIX (Portable Operating System Interface) เป็นกลุ่มของมาตรฐานการติดต่อระหว่างกันของโปรแกรมภายในระบบปฏิบัติการ UNIX ที่เรียกกันว่า Application Programming Interface (API) และอยู่ในตระกูลของมาตราฐานที่เกี่ยวข้องโดย IEEE ซึ่งระบบปฏิบัติการ GNU/Linux ก็เป็นรองรับส่วนหนึ่งของมาตราฐาน POSIX นอกจากนั้นผู้ผลิตระบบปฏิบัติการส่วนใหญ่จะเริ่มเน้นรองรับ POSIX มากขึ้นเรื่อยๆ เนื่องจากเป็นตัวที่ออกหลังจาก System V จึงได้ปรับปรุงแก้ไขจุดด้อยต่างๆของ System V จนทำให้มีการใช้งานที่มีประสิทธิภาพมากขึ้น

ทั้งสองมาตราฐานมีชุดเครื่องมือพื้นฐานที่เหมือนกันได้แก่ semaphores, shared memory และ message queues แม้จะมีรูปแบบการติดต่อที่แตกต่างกันอยู่บ้างเล็กน้อย เช่นใน POSIX จะมีฟังก์ชันพิเศษเพิ่มเติมขึ้นมาให้เพื่อช่วยในการแจ้งเตือนข้อความภายใน message queue (`mq_notify()`) เป็นต้น แต่แนวคิดการทำงานพื้นฐานจะเหมือนกัน


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aic-eec.com/computer-operation-systems/linux-os-dev.-engineer/ipc/msg.-queue-programming.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
