This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Difference between proc_create and chardev access



Hi Experts,

What is the key difference between proc_create() and the chardev in the  Linux kernel ?

Both seems to give the user space -> kernel space File operations

  • proc is a filesystem like sysfs.
    Through "proc_create" you can access the variables via (cat and echo) but character device would access the file operation like read,write etc.,
    proc_create is the temporary filesystem. You can create proc for read and write as well.
  • In addition to Titusrathinaraj Stalins comment,

    proc or sys entries are ment for debug information collection purpose. Device nodes are for actual operation on the device.
    Even though you can communicate with kernel using proc or sysfs for a valid operation read/write/ are recommonded. Also there are some limitation of size and other parameters on data which we can exchange with kernel using /proc or /sys