JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
III Year B.Tech. IT/CST - I Sem L T/P/D C
4 - / - /- 4
(A50517) LINUX PROGRAMMING
Objectives:
- To understand and make effective use of Linux utilities and Shell scripting language (bash) to solve Problems.
- To implement in C some standard Linux utilities such as ls, mv, cp etc. using system calls.
- To develop the skills necessary for systems programming including file system programming, process and signal management, and interprocess communication.
- To develop the basic skills required to write network programs using Sockets.
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-Scripts, Operation, Addresses, Commands, awk-Execution, Fields and Records,
Scripts, Operation, Patterns, Actions, Associative Arrays, String and Mathematical functions, System commands in awk, 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 permissions - chmod, fchmod, file ownership-chown, lchown, links-soft and hard links - symlink, link, unlink.
Directories-Creating, removing and changing Directories-mkdir, rmdir, chdir, obtaining current working directory-getcwd, Directory contents, Scanning Directories-opendir, readdir, closedir, rewinddir 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 and Controlling Terminal, Differences between threads and 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 functions.
UNIT - IV:
Interprocess Communication - Introduction to IPC, IPC between processes on a single computer system, IPC between processes on different systems, pies-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 and 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 and Internet domain), Socket system calls for connection oriented protocol and connectionless protocol, example-client/server programs-Single Server-Client connection, Multiple simultaneous clients, Socket options-setsockopt and fcntl system calls, Comparison of IPC mechanisms.
TEXT BOOKS:
- Unix System Programming using C++, T. Chan, PHI.
- Unix Concepts and Applications, 4th Edition, Sumitabha Das, TMH.
- Unix Network Programming, W. R. Stevens, PHI.
REFERENCE BOOKS:
- Beginning Linux Programming, 4th Edition, N. Mathew, R. Stones, Wrox, Wiley India Edition.
- Unix for programmers and users, 3rd Edition, Graham Glass, King Ables, Pearson.
- SystemProgramming with C andUnix, A. Hoover, Pearson.
- Unix System Programming, Communication, Concurrency and Threads, K. A. Robbins, Pearson Education.
- Unix shell Programming, S. G. Kochan and P. Wood, 3rd edition, Pearson Education.
- Shell Scripting, S. Parker, Wiley India Pvt. Ltd.
- Advanced Programming in the unixEnvironment, 2nd edition, W. R. Stevens and S. A. Rago, Pearson Education.
- Unix and Shell Programming, B. A. Forouzan and R. F. Gilberg, Cengage Learning.
- Linux System Programming, Robert Love, O'Reilly, SPD.
- C Programming Language, Kernighan and Ritchie, PHI.
Outcomes:
- Work confidently in Linux environment.
- Work with shell script toautomate different tasks as Linux administration.
-
CreatedJun 19, 2015
-
UpdatedJun 20, 2015
-
Views11,878