Sie sind auf Seite 1von 3

A8-R3 : BASICS OF OS, UNIX AND SHELL

PROGRAMMING
Objective of the Course

The objective of the course is to make students aware of the functioning of a multi-user operating
system. This course will serve as a foundation course for the higher level course in Unix. The
students are expected to learn the commands while doing practical and emphasis should be
given to those switches/options and flags. which are most frequently used in real life.

After completion of the course students will be able to:

• Understand Operating System concepts.


• Use System calls and memory management.
• Use Unix commands and editors.
• Carry out Unix File management and shell programming in Unix.
• Do Network configuration and security management in Unix.

Detailed Syllabus

1. Operating System Concepts 8 Hrs.

Overview of OS. Services offered. System calls. Process management. Scheduling and Threads.
Memory management. Swapping. File System. Directory Structure. UNIX Architecture: Multi-user
and multitasking. Kernel and shell. The file system. Relation between process and file. The
building block approach. The command line. Command syntax. Internal and external commands.
The two schools (AT&T and Berkeley). The graphical user interface (GUI). Seeking help (man),
Open source software and linux.

2. The File System 3 Hrs.

Types of files in Unix. Strl,lcture of the file system. File System types. Parent-child relationship.
Directory handling and navigation (mkdir, rmdir, pwd and cd). The PATH variable. Absolute and
relative pathnames. The. and.. directories. Creating, viewing (cat), copying (cp), renaming (mv)
and deleting (rm) files. listing files (Is), Viewing through pg, tail and head command.

3. File Attributes 2 Hrs.

Structure of the inode. Brief discussion on partitions and file systems. Analyzing the ls -l output.
File type and permissions (chmod). Significance of directory permissions. Hard and soft Links (ln
and ln -s). Concept of ownership. The /etc/passwd and /etc/group files. Changing ownership
(chown and chgrp). Modification and access times. Default file and directory permissions
(umask).

4. The vi Editor 3 Hrs.

The three modes. Basic navigation (h, j, k, l). Moving to a specifc line number (G). The repeat
factor. The input mode commands (l, a, r, s and o). Saving and quitting (:w, :x and :q). Text
deletion (x and X). Using operators in deleting and copying text (d, yand p). Undoing and
repeating commands (u and .). Pattern search (/ and n) and substitution (:s). Moving text from
one file to the other. Customization features: abbreviation (:abb), key mapping (:map) and setting
vi parameters (:set). the file .exrc.

5. The Shell as Interpreter 3 Hrs.

The major shells: Bourne Shell, C shell, Korn and Bash. The shell's interpretive cycle. Wild-cards.
Escaping and quoting. Difference between single and double quotes. The three standard files and
redirection (>, < and >>). Connecting commands with pipes (I). Command substitution. Shell
variables and how they determine system behavior. Aliases and Command history, Environment
variables, setting terminal (Sty.)

6. Process Management 4 Hrs.

Process basics, Process States, Process State Transition, Process Control Block (PCB). Parent-
child relationship. The different segments of a process. Internal and external commands. Process
creation basics (fork(), exec()and wait()). Role of init in process creation and in spawning user
shells. Exporting variables (export) and consequences.

Exit status of a process ($?). Displaying process attributes (ps)Killing processes (kill), Running
commands in background (& and nohup). Job control (fg, bg and (Ctrl-z]), Scheduling processes
(cron).

7. Networking Tools 6 Hrs.

Features of TCP/IP: reliability, retransmission, rerouting. The client-server mechanism.


Hostnames and IP addresses. Role of /etc/hosts in host-address resolution. Advantages of using
domains. DNS and the Internet domain structure. Testing network connectivity (ping). Emall
basics; the mall command. Remote login (telnet) and remote file transfer (ftp). The HTTP protocol
and the World Wide Web. Hypertext, hyperlinks and markup. HTMl concepts (very brief). Analysis
of the URl.

8. The X-Window System 2 Hrs.

The X Architecture: the reversed client-server mechanism. Role of the window manager.
Common Desktop Environment. Running programs remotely using xhost and telnet. The
DISPLAY variable and the display options of X clients. Common X client options. The .xinitrc
initialization file. Common X clients: xterm, xclock and xclipboard.

9. Filters and Regular Expressions 3 Hrs.

Using wc, head, tail and cut commands. Translating characters (tr). Specifying file and searching
for a pattern (grep). Performing substitution (sed). Enhancing power of grep and sed with regular
expressions.

10. The awk Filter 3 Hrs.

Selection criteria and action. Splitting a line into fields and using printf. Using regular expressions.
Computation using decimal numbers. The BEGIN and END sections. Using arrays with both
numeric and nonnumeric subscript. String handling using built-in functions. Programming
constructs: if, for, while. Using awk in pipelines.

11. Shell Programming 6Hrs.


Shell scripts, and execution methods. User's initialization file (. profile and rc, etc). The dot
command. Interactive execution and command line arguments ($1. $2. etc). Meta Characters -
syntactic (&&, (), &, ||, ;; , <, > etc ). pattern matching, substitute shell variables. Quoting, Test
Command. Control flow: For, If, While, Case. The Here document, String handling and
computation using expr. Setting positional parameters (set command), and shift. Shell
functions.lnterrupt handling (trap), Korn and Bash shell features, let command, arrays.

12. C Programming Tools 4 Hrs.

Compiling a C program (cc). Multi module programs. Header files. System Calls and Ubrary
functions. The I/O functions. Static and shared libraries. The make utility and makeflles. Creating
archives (ar).

13. UNIX Internals 6 Hrs.

Kernel basics, processes and files, system calls. User mode and kernel mode. The file system,
disk architecture, block I/O. How Inode stores all blocks of a file. File system layout. The
superblock. Process Management. The magic number. Kernel processes and user processes.
Process states. Process table.

14. Administering File Systems 4 Hrs.

Device flies. Block and character devices. Partitions and file systems (in detail). Types of file
systems. Mounting local and networked file systems (mount, umount and /etc/fstab). File system
checking (fsck). Compressing flies (compress, gzip and zip). Checking free space and disk usage
(df and du). Finding flies (find). Backing up files (tar, dump,cpio,dd), creation of user, deletion of
user.

15. General System Admininistration 3 Hrs.

The role and powers of the system administrator. Becoming super user (su). User administration
(useradd, usermod, userdel and passwd). Understanding /ete/passwd and /ete/shadow. Role of
init in startup and shutdown. Understanding /etc/inittab. Enforcing security with set-user-id and
sticky bit.

RECOMMENDED BOOKS

MAIN READING

1. Maurice J. Bach, "Design of the Unix Operating System", Third Edition,2000,PHI,

2. Sumitabha Das, "Unix: Concepts and Applications", Third Edition,1998,Tata McGraw Hill

SUPPLEMENTARY READING

1. A User guide to unix system",Thomas Rebecca yate,Second Edltion,2002, Tata McGraw Hill.

2. Stephen Prata "Advanced Unix-A programmer's Guide"

Das könnte Ihnen auch gefallen