Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
18 views

Course Handout Systems Programming

Uploaded by

tanmaykcalt
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Course Handout Systems Programming

Uploaded by

tanmaykcalt
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI

WORK INTEGRATED LEARNING PROGRAMMES


COURSE HANDOUT

Part A: Content Design

Course Title Systems Programming


Course No(s) IS ZC327
Credit Units 3/4
Credit Model 3 (1-1-1) / 4 (1-1-2)
(1 unit for class room hours, 1 unit for lab hours, 1 unit for student
preparation (2 units if 4 credit course)).
Typically 1 unit translates to 32 hours
Course Author Chandra Shekar RK
Version No 1.0
Date

Course Objectives
No Course Objective

CO1 To provide understanding of the files, directory and file systems.

CO2 To provide insight into UNIX commands and Shell scripting.

CO3 To provide understanding of the System calls and its usage with C programming.

CO4 To provide understanding of assemblers, linkers and loaders

Text Book(s)
T1 Brian. W. Kernighan and Rob Pike, “The UNIX Programming Environment”, Prentice
– Hall of India, Pvt. Ltd, 1984.

Reference Book(s) & other resources


R1 Muster J.C., Introduction to UNIX and LINUX, McGraw Hill, 2002.
R2 Quigley E., UNIX Shells by Example, Prentice Hall, 2001.
R3 O'Reilly, Learning the vi Editor, 6th Edition, 1998, Arnold Robbins, Linda Lamb
R4 O'Reilly, Learning the bash Shell, 2nd Edition, By Cameron Newham, Publisher:
O'Reilly Media, Released: March 2005, 3rd edition
R5 W. Richard Stevens, “Advanced Programming in the UNIX environment” 2nd edition,
Addition-Wesley, 2005.
R6 Maurice J. Bach, “The Design of the Unix Operating System”, PHI, 1993
R7 Leland L. Beck, “System Software – An Introduction to Systems Programming”, 3rd
Edition, Pearson Education Asia, 2006.

Modular Content Structure

1. Directories and Files in UNIX / Linux system. Basic UNIX commands


1.1. Getting Introduction to UNIX / Linux
1.2. Logging in to Linux system
1.3. UNIX files and directories
1.4. Basic UNIX commands
2. Internals of Unix file system, I/O in UNIX
2.1. Basics of files, UNIX file system, Inode structure in UFS, Links in UNIX
2.2. Directories in UNIX, Conversion of a path name to an inode, open files and
descriptor management
2.3. File system layout, Superblock, I/O in UNIX – Kernel I/O structure, I/O devices –
Block and Character devices, Device drivers, I/O queuing and interrupt handling
3. VI editor, File and directory commands, I/O indirection and Filters
3.1. Working with VI editor: Basic operating modes
3.2. Commands for copying & pasting text and pattern searching & substitution of text in
command mode, Recovering files in vi editor
3.3. File and directory commands – cat, cp, mv, rm, chmod, cmp, diff and top
3.4. I/O indirection, Filters – wc, sort, head, tail, grep, pipe and tee
4. Shell Scripting
4.1. Pattern matching and Shell Meta characters
4.2. Shell Scripting: simple programs, interactive shell scripting, arithmetic in shell,
variables in shell with more example programs
4.3. Decision making constructs in Shell with more example programs
4.4. Loop constructs in Shell with more example programs
4.5. Files using Shell scripting with more example programs
5. System calls
5.1. Need for protection, System call – User mode and Kernel mode communication,
execution of a system call, system call example program in C, difference between
system call and function call, system call examples
5.2. System calls for low level file I/Os – open, creat, close, read, write, lseek, mkdir,
rmdir, rename, link, symlink, unlink
5.3. System calls related to process – fork, wait, waitpid, exec, signal, kill and raise
6. Assemblers, Linkers and Loaders
6.1. Assemblers – assembler’s functions, assembler directives, object code structure,
object code, two pass assembler, data structures for two pass assembler – operation
code table, symbol table and location counter
6.2. Linker and Loader – Absolute loader, absolute loader implementation. Relocation
loader using modification record, Relocation loader using relocation bit mask
6.3. Linker and Loader – Program linking, implementation of linking loader, data
structures, external symbol table, program load address and control section address,
algorithm. Dynamic linking – dynamic linking applications, dynamic linking
implementation

Learning Outcomes:
No Learning Outcomes

LO1 Students will be able to explain how the Unix command shell processes commands

LO2 Write simple shell scripts

LO3 Explain how the Unix file system stores information

LO4 Explain how concurrent processes are used in Unix

LO5 Basic understanding of assemblers, linkers and loaders

Part B: Contact Session Plan

Academic Term First Semester 2024-2025


Course Title Systems Programming
Course No IS ZC327
Lead Instructor G PRAVEEN KUMAR

Course Contents

Contact List of Topic Title Topic # Text/Ref


Hour (from content structure in Part A) (from Book/external
content resource
structure in
Part A)

1 Directories and Files in UNIX / Linux system. Basic 1.1 Ch1(T1),Ch1(R1)


UNIX commands
Getting Introduction to UNIX / Linux

2 Logging in to Linux system 1.2 Ch1(T1),Ch1(R1),


Ch1(R5)

3 UNIX files and directories 1.3 Ch2(T1),Ch1(R5)

4 Basic UNIX commands 1.4 Ch1(T1)

5 Internals of Unix file system, I/O in UNIX 2.1 Ch2(T1),Ch4(R6)


Basics of files, UNIX file system, Inode structure in
6 UFS, Links in UNIX

7 Directories in UNIX, Conversion of a path name to an 2.2 Ch2(T1),Ch4(R6)


inode, open files and descriptor management
8

9 File system layout, Superblock, I/O in UNIX – Kernel 2.3 Ch2(T1),Ch4(R6)


I/O structure, I/O devices – Block and Character
10 devices, Device drivers, I/O queuing and interrupt
handling

11 VI editor, File and directory commands, I/O 3.1 Ch4(R1),Ch1,2,3,


indirection and Filters 4(R3)
Working with VI editor: Basic operating modes

12 Commands for copying & pasting text and pattern 3.2 Ch4(R1),Ch1,2,3,
searching & substitution of text in command mode, 4(R3)
Recovering files in vi editor

13 File and directory commands – cat, cp, mv, rm, 3.3 Ch5,6,7,9(R1)
chmod, cmp, diff and top

14 I/O indirection, Filters – wc, sort, head, tail, grep, pipe 3.4 Ch3(T1)
and tee

15 Review

16 Review

17 Shell Scripting 4.1 Ch3(T1),Ch2(R4)


Pattern matching and Shell Meta characters

18 Shell Scripting: simple programs, interactive shell 4.2 Ch3(T1),Ch2(R4)


scripting, arithmetic in shell, variables in shell with
more example programs

19 Decision making constructs in Shell with more 4.3 Ch5(T1),Ch3,4,5,6


example programs (R4)
Ch8(R2)

20 Loop constructs in Shell with more example programs 4.4 Ch5(T1),Ch3,4,5,6


(R4)
Ch8(R2)

21 Files using Shell scripting with more example 4.5 Ch5(T1),Ch6(T1),


22 programs Ch7(R4)

23 System calls 5.1 Ch7(T1),Ch5(R6)


Need for protection, System call – User mode and
Kernel mode communication

24 execution of a system call, system call example 5.1 Ch7(T1),Ch5(R6)


program in C, difference between system call and
function call, system call examples

25 System calls for low level file I/Os – open, creat, 5.2 Ch7(T1),Ch3,4,5(
close, read, write, lseek, mkdir, rmdir, rename, link, R5),Ch5(R6)
symlink, unlink

26 System calls related to process – fork, wait, waitpid, 5.3 Ch7(T1)


exec, signal, kill and raise

27 Assemblers, Linkers and Loaders 6.1 Ch2(R7)


Assemblers – assembler’s functions, assembler
28 directives, object code structure, object code, two pass
assembler, data structures for two pass assembler –
operation code table, symbol table and location
counter

29 Linker and Loader – Absolute loader, absolute loader 6.2 Ch3(R7)


implementation. Relocation loader using modification
record, Relocation loader using relocation bit mask

30 Linker and Loader – Program linking, implementation 6.3 Ch3(R7)


of linking loader, data structures, external symbol
table, program load address and control section
address, algorithm. Dynamic linking – dynamic
linking applications, dynamic linking implementation

31 Review

32 Review

Detailed Plan for Lab work/Design work:

1. Any Unix or Linux based system with GCC compiler


2. Can also make use of Virtual lab server for doing labs
Lab Lab Objective Lab Sheet Content
No Access URL Reference

1 Execute all the Basic UNIX commands with different options Module 1
in server and observe the result
Basic UNIX commands – passwd, date, who, who am i, mail,
write, man, pwd and ls
Basic UNIX commands – mkdir, cd [using relative and
absolute path], creating a new file using editor ed and
command cat, displaying the content of a file using cat and pr
commands
2 Discussion about various types of links [hard, symbolic] in Module 2
UFS. Different between these links. Discussion on choosing
hard link Vs Symbolic link

3 Explore VI Editor and execute all the UNIX commands Module 3


discussed in this module with different options in server and
observe the result

4 Execute shell script programs in server Module 4


Example programs using variables and decision making
constructs
Example programs using decision making constructs.
Example programs using loop construct
Files using shell scripting – programs to take data from file,
manipulate the data and store it in file

5 Write C programs which uses all the system calls directly Module 5

6 System calls for low level file I/Os – open, creat, close, read, Module 5
write, lseek, mkdir, rmdir, rename, link, symlink, unlink

7 System calls related to process – fork, wait, waitpid, exec, Module 5


signal, kill and raise

8 Demo of Assembler, linker and loader (8086) Module 6


TASM, TLINK

Lab Please refer to System Programming Lab


Q's

Evaluation Scheme
Evaluation Name Type Weight Duration Day, Date, Session,
Component (Quiz, Lab, Project, (Open book, Time
Midterm exam, End Closed book,
semester exam, etc) Online, etc.)

EC - 1 Assignment (Project Contact 20% 25min To be announced


Presentation)

EC - 2 Mid-term Exam Closed book 30% 2 hours Saturday,


21/09/2024 (AN)

EC - 3 End Semester Exam Open book 50% 3 hours Saturday,


30/11/2024 (AN)
Note - Evaluation components can be tailored depending on the proposed model.

Important Information

Syllabus for Mid-Semester Test (Closed Book): Topics in Weeks 1-7


Syllabus for Comprehensive Exam (Open Book): All topics given in plan of study

Evaluation Guidelines:
1. EC-1 consists of either two Assignments or three Quizzes. Announcements regarding the
same will be made in a timely manner.
2. For Closed Book tests: No books or reference material of any kind will be permitted.
Laptops/Mobiles of any kind are not allowed. Exchange of any material is not allowed.
3. For Open Book exams: Use of prescribed and reference text books, in original (not
photocopies) is permitted. Class notes/slides as reference material in filed or bound form is
permitted. However, loose sheets of paper will not be allowed. Use of calculators is permitted
in all exams. Laptops/Mobiles of any kind are not allowed. Exchange of any material is not
allowed.
4. If a student is unable to appear for the Regular Test/Exam due to genuine exigencies, the
student should follow the procedure to apply for the Make-Up Test/Exam. The genuineness of
the reason for absence in the Regular Exam shall be assessed prior to giving permission to
appear for the Make-up Exam. Make-Up Test/Exam will be conducted only at selected exam
centres on the dates to be announced later.
It shall be the responsibility of the individual student to be regular in maintaining the self-study
schedule as given in the course handout, attend the lectures, and take all the prescribed evaluation
components such as Assignment/Quiz, Mid-Semester Test and Comprehensive Exam according to the
evaluation scheme provided in the handout.

You might also like