Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linux API Dr. Michael L. Collard 1.

Similar presentations


Presentation on theme: "Linux API Dr. Michael L. Collard 1."— Presentation transcript:

1 Linux API Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu 1

2 Linux Systems Programming Linux API – set of calls that applications, directly or indirectly, use to interact with the Linux kernel File, directory, and filesystem access Communication Concurrency Control

3 Device Interface files, terminals, disks, tapes, audio, network, peripheral devices device driver – Kernel module, typically LKM (Loadable Kernel Module) devices represented as special files

4 Device Types Regular file Block device (block special file) – similar to a disk, transfers information in blocks Character device (character special file) – terminal-like with a stream of bytes in order Network device – no device node, use name with socket to ioctl File-system device – Rarely directly access, through ioctl

5 Uniform Device Access File descriptor 0 – STDIN_FILENO, 1 – STDOUT_FILENO, 2 – STDERR_FILENO open close read write ioctl

6 Process Creation init – special process, parent of all processes fork exec family: execle wait

7 Interrupts & Signals Interrupt generated by hardware, typically by external device drivers, and typically asynchronous Signal How software is notified of an asynchronous event Signal Handler – How a process catches and handles a generated signal

8 Terminal Control Special Devices have special capabilities termios.h tcgetattr tcsetattr


Download ppt "Linux API Dr. Michael L. Collard 1."

Similar presentations


Ads by Google