How do the kernel and processes communicate?Must an application-layer protocol exist for communication between any two programs using sockets?What is the relation between Virtual Machine Manager and KVM/QEMU?So the design of client-server separation is not the bottleneck of X Window?Linux process - messages from kernelDifferences between system processes, and user processes, kernel control paths and kernel threadAre kernel threads processes and daemons?How does Linux kernel find out which process to wake up during interrupt handling?strace for troubleshooting inter process communicationMeasuring speed of communications between processesWhat do asynchronous and synchronous mean in notifying processes of system events, and in process reacting to a signal delivery?How to measure the bandwidth of IPCCommunication between user space and kernel space - AF_netlink + AF_Unix

Inappropriate reference requests from Journal reviewers

How do we know the LHC results are robust?

Is a stroke of luck acceptable after a series of unfavorable events?

How does Loki do this?

Is the destination of a commercial flight important for the pilot?

Do sorcerers' Subtle Spells require a skill check to be unseen?

Roman Numeral Treatment of Suspensions

Would this custom Sorcerer variant that can only learn any verbal-component-only spell be unbalanced?

What is the intuitive meaning of having a linear relationship between the logs of two variables?

Why are there no referendums in the US?

A particular customize with green line and letters for subfloat

What is the best translation for "slot" in the context of multiplayer video games?

Go Pregnant or Go Home

What does "I’d sit this one out, Cap," imply or mean in the context?

Why escape if the_content isnt?

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

How can we prove that any integral in the set of non-elementary integrals cannot be expressed in the form of elementary functions?

Did the DC-9 ever use RATO in revenue service?

How easy is it to start Magic from scratch?

Is expanding the research of a group into machine learning as a PhD student risky?

Avoiding estate tax by giving multiple gifts

How to check is there any negative term in a large list?

Return the Closest Prime Number

Is oxalic acid dihydrate considered a primary acid standard in analytical chemistry?



How do the kernel and processes communicate?


Must an application-layer protocol exist for communication between any two programs using sockets?What is the relation between Virtual Machine Manager and KVM/QEMU?So the design of client-server separation is not the bottleneck of X Window?Linux process - messages from kernelDifferences between system processes, and user processes, kernel control paths and kernel threadAre kernel threads processes and daemons?How does Linux kernel find out which process to wake up during interrupt handling?strace for troubleshooting inter process communicationMeasuring speed of communications between processesWhat do asynchronous and synchronous mean in notifying processes of system events, and in process reacting to a signal delivery?How to measure the bandwidth of IPCCommunication between user space and kernel space - AF_netlink + AF_Unix













1















In Linux there are various ways for inter process communication, for example, shared memory, (named) pipe, socket, message queue.



What are equivalent or similar ways in which Linux kernel and processes communicate? Are the following some of the ways?



  • Processes making system calls to kernel,

  • kernel sending signals to processes,

  • processes uses files through which kernel exposes some functionalities, e.g. QEMU uses KVM via its /dev/kvm device node

  • more ...?

Is it correct that interprocess communication can transfer arbitrary data between processes, while the forms of data which can be transferred between kernel and process are more limited (according to the ways that I list)?



Thanks.










share|improve this question
























  • Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

    – 炸鱼薯条德里克
    yesterday















1















In Linux there are various ways for inter process communication, for example, shared memory, (named) pipe, socket, message queue.



What are equivalent or similar ways in which Linux kernel and processes communicate? Are the following some of the ways?



  • Processes making system calls to kernel,

  • kernel sending signals to processes,

  • processes uses files through which kernel exposes some functionalities, e.g. QEMU uses KVM via its /dev/kvm device node

  • more ...?

Is it correct that interprocess communication can transfer arbitrary data between processes, while the forms of data which can be transferred between kernel and process are more limited (according to the ways that I list)?



Thanks.










share|improve this question
























  • Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

    – 炸鱼薯条德里克
    yesterday













1












1








1








In Linux there are various ways for inter process communication, for example, shared memory, (named) pipe, socket, message queue.



What are equivalent or similar ways in which Linux kernel and processes communicate? Are the following some of the ways?



  • Processes making system calls to kernel,

  • kernel sending signals to processes,

  • processes uses files through which kernel exposes some functionalities, e.g. QEMU uses KVM via its /dev/kvm device node

  • more ...?

Is it correct that interprocess communication can transfer arbitrary data between processes, while the forms of data which can be transferred between kernel and process are more limited (according to the ways that I list)?



Thanks.










share|improve this question
















In Linux there are various ways for inter process communication, for example, shared memory, (named) pipe, socket, message queue.



What are equivalent or similar ways in which Linux kernel and processes communicate? Are the following some of the ways?



  • Processes making system calls to kernel,

  • kernel sending signals to processes,

  • processes uses files through which kernel exposes some functionalities, e.g. QEMU uses KVM via its /dev/kvm device node

  • more ...?

Is it correct that interprocess communication can transfer arbitrary data between processes, while the forms of data which can be transferred between kernel and process are more limited (according to the ways that I list)?



Thanks.







linux-kernel process ipc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







Tim

















asked yesterday









TimTim

28.2k78269490




28.2k78269490












  • Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

    – 炸鱼薯条德里克
    yesterday

















  • Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

    – 炸鱼薯条德里克
    yesterday
















Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

– 炸鱼薯条德里克
yesterday





Please ask about a specific case you want to know. There are always sort of permission check for userland accessing data, no matter where ever the data is.

– 炸鱼薯条德里克
yesterday










1 Answer
1






active

oldest

votes


















2














Inter-process communications are in some respect a special case of communications between user-space and the kernel, since inter-process communications are always mediated by the kernel (at least for setup and teardown).



Note that when a process calls into the kernel, the process is still running, but in kernel mode. So distinguishing between a process and the kernel, while convenient, is somewhat inaccurate and can lead to misunderstandings. The events you’ve listed do cause data to be passed from user-space to the kernel, and processing to be performed in kernel mode; other examples include




  • ioctl (which is really a system call, but is so generic that it’s useful to consider it separately);

  • memory-mapped files (memory-mapping also being one way of implementing shared memory between processes);


  • netlink sockets.

The nature of the data which can be transferred between user-space and the kernel isn’t inherently limited in any way; for example, write allows you to write anything to a file, and send allows you to write anything to a socket. Whether the data is meaningful depends on what you’re doing; see your own Must an application-layer protocol exist for communication between any two programs using sockets? question (which applies to any form of communication).






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508704%2fhow-do-the-kernel-and-processes-communicate%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Inter-process communications are in some respect a special case of communications between user-space and the kernel, since inter-process communications are always mediated by the kernel (at least for setup and teardown).



    Note that when a process calls into the kernel, the process is still running, but in kernel mode. So distinguishing between a process and the kernel, while convenient, is somewhat inaccurate and can lead to misunderstandings. The events you’ve listed do cause data to be passed from user-space to the kernel, and processing to be performed in kernel mode; other examples include




    • ioctl (which is really a system call, but is so generic that it’s useful to consider it separately);

    • memory-mapped files (memory-mapping also being one way of implementing shared memory between processes);


    • netlink sockets.

    The nature of the data which can be transferred between user-space and the kernel isn’t inherently limited in any way; for example, write allows you to write anything to a file, and send allows you to write anything to a socket. Whether the data is meaningful depends on what you’re doing; see your own Must an application-layer protocol exist for communication between any two programs using sockets? question (which applies to any form of communication).






    share|improve this answer



























      2














      Inter-process communications are in some respect a special case of communications between user-space and the kernel, since inter-process communications are always mediated by the kernel (at least for setup and teardown).



      Note that when a process calls into the kernel, the process is still running, but in kernel mode. So distinguishing between a process and the kernel, while convenient, is somewhat inaccurate and can lead to misunderstandings. The events you’ve listed do cause data to be passed from user-space to the kernel, and processing to be performed in kernel mode; other examples include




      • ioctl (which is really a system call, but is so generic that it’s useful to consider it separately);

      • memory-mapped files (memory-mapping also being one way of implementing shared memory between processes);


      • netlink sockets.

      The nature of the data which can be transferred between user-space and the kernel isn’t inherently limited in any way; for example, write allows you to write anything to a file, and send allows you to write anything to a socket. Whether the data is meaningful depends on what you’re doing; see your own Must an application-layer protocol exist for communication between any two programs using sockets? question (which applies to any form of communication).






      share|improve this answer

























        2












        2








        2







        Inter-process communications are in some respect a special case of communications between user-space and the kernel, since inter-process communications are always mediated by the kernel (at least for setup and teardown).



        Note that when a process calls into the kernel, the process is still running, but in kernel mode. So distinguishing between a process and the kernel, while convenient, is somewhat inaccurate and can lead to misunderstandings. The events you’ve listed do cause data to be passed from user-space to the kernel, and processing to be performed in kernel mode; other examples include




        • ioctl (which is really a system call, but is so generic that it’s useful to consider it separately);

        • memory-mapped files (memory-mapping also being one way of implementing shared memory between processes);


        • netlink sockets.

        The nature of the data which can be transferred between user-space and the kernel isn’t inherently limited in any way; for example, write allows you to write anything to a file, and send allows you to write anything to a socket. Whether the data is meaningful depends on what you’re doing; see your own Must an application-layer protocol exist for communication between any two programs using sockets? question (which applies to any form of communication).






        share|improve this answer













        Inter-process communications are in some respect a special case of communications between user-space and the kernel, since inter-process communications are always mediated by the kernel (at least for setup and teardown).



        Note that when a process calls into the kernel, the process is still running, but in kernel mode. So distinguishing between a process and the kernel, while convenient, is somewhat inaccurate and can lead to misunderstandings. The events you’ve listed do cause data to be passed from user-space to the kernel, and processing to be performed in kernel mode; other examples include




        • ioctl (which is really a system call, but is so generic that it’s useful to consider it separately);

        • memory-mapped files (memory-mapping also being one way of implementing shared memory between processes);


        • netlink sockets.

        The nature of the data which can be transferred between user-space and the kernel isn’t inherently limited in any way; for example, write allows you to write anything to a file, and send allows you to write anything to a socket. Whether the data is meaningful depends on what you’re doing; see your own Must an application-layer protocol exist for communication between any two programs using sockets? question (which applies to any form of communication).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        Stephen KittStephen Kitt

        178k24405482




        178k24405482



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508704%2fhow-do-the-kernel-and-processes-communicate%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.