×
In order to succeed, we must first believe that we can.
--Your friends at LectureNotes
Close

LINUX PROGRAMMING

by Jntu Heroes
Type: NoteInstitute: JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY Downloads: 163Views: 1875Uploaded: 7 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Jntu Heroes
Jntu Heroes
LECTURE NOTES ON LINUX PROGRAMMING IV B. Tech I semester COMPUTER SCIENCE AND ENGINEERING 1
Syllabus UNIT-I: Linux Utilities-File handling utilities, Security by file permissions, Process utilities, Disk utilities, Networking commands, Filters, Text processing utilities and Backup utilities.sed – awk – execution, fields and records.scripts, scripts, operation, addresses, commands, operation, patterns, actions, associative arrays, string & mathematical functions, system commandsinawk,applications. Shell programming with Bourne again shell(bash): Introduction, shell responsibilities, pipes and Redirection, here documents, running a shell script, the shell as a programming language, shell meta characters, file name substitution, shell variables, command substitution, shell commands, the environment, quoting, test command, control structures, arithmetic in shell, shell script examples, interrupt processing, functions, debugging shell scripts. UNIT-II: Files and Directories: File Concept, File types, File System Structure, File metadata- Inodes, kernel support for files, System calls for file I/O operations- open, create, read, write, close, lseek,dup2, file status information- stat family, file and record locking- fcntl function, file permission- chmod, fchmod, file ownership- chown, lchown, fchown, links- soft links & hard links- symlink, link, ulink Directories: creating, removing and changing directories- mkdir, rmdir, chdir, obtaining current working directory- getcwd, directory contents, scanning directories- opendir, readdir, closedir,rewind dir functions. UNIT-III: Process – Process concept, Layout of a C program, image in main memory, process environment- environment list, environment variables, getenv, setenv, Kernel support for process, process identification, process control - process creation, replacing a process image, waiting for a process, process termination, zombie process, orphan process, system call interface for process management- fork, vfork, exit, wait, waitpid, exec family, process groups, sessions & controlling terminal, differences between threads & processes. Signals– Introduction to signals, Signal generation and handling, Kernel support for signals, Signal function, unreliable signals, reliable signals, kill, raise , alarm, pause, abort, sleep 2
functions. UNIT-IV: Interprocess Communication : Introduction to IPC, IPC between processes on a single computer system, IPC between processes on different systems, Pipes- creation, IPC between related processes using unnamed pipes, FIFOs- creation, IPC between unrelated processes using FIFOs(named pipes), differences between unnamed and named pipes, popen & pclose library functions.Message Queues- Kernel support for messages, APIs for message queues, client/server example. Semaphores-Kernel support for semaphores, APIs for semaphores, file locking with Semaphores UNIT -V: Shared Memory- Kernel support for shared memory, APIs for shared memory, shared memory example.Sockets: Introduction to Berkeley Sockets, IPC over a network, client/server model, Socket Address structures (UNIX domain & internet domain), Socket system calls for connection oriented protocol and connectionless protocol, example-client/server programssingle client/server connection, Multiple simultaneous clients, Socket options- setsockopt & fcntl system calls, comparision of IPC mechanisms. TEXT BOOKS: 1. Unix System Programming using C++, T.Chan, PHI. 2. Unix Concepts and Applications, 4th Edition, Sumitabha Das, TMH. 3. Unix Network Programming, W.R.Stevens,PHI. REFERENCE BOOKS: 1. Beginning Linux Programming, 4th Edition, N.Matthew, R.Stones,Wrox, Wiley India Edition. 2. Unix for programmers and users, 3rd Edition, Graham Glass, King Ables, Pearson Education. 3.System Programming with c and unix,A.Hoover,Pearson. 4. Unix System programming,Communication,Concurrency and Threads,K.A.Robbins and S.Robbins,Pearson Education. 3
5. Unix shell Programming,S.G.kocham and P.Wood,3rd edition,Pearson Education. 6.Shell scripting,S.Parker,Wiley India pvt.Ltd. 7. Advanced Programming in the Unix environment, 2nd Edition, W.R.Stevens, Pearson Education. 8. Unix and shell Programming, B.A.Forouzan and R.F.Gilberg,cengage Learning. 9. Linux System Programming,Robert Love,O’Reilly,SPD. 10. C Programming Language,Kernighan and Ritchie,PHI. 4

Lecture Notes