DAC - School - TG - Concepts of Programming and Operating System
DAC - School - TG - Concepts of Programming and Operating System
Duration: 66 hours (36 class room hours + 22 lab hours + 8 revision/practice hours)
Concepts of Programming
Text Book:
Core and Advanced Java Black Book / Dreamtech Press
References:
Java The Complete Reference by Herbert Schildt / McGraw Hill
Core Java : Fundamentals - Volume 1 Gary Cornell, Cay S. Horstmann/ Pearson
Programming in Java by Sachin Malhotra, Saurabh Choudhary / Oxford University Press
Session 4: Objects
Lecture:
Reference variables and methods
Constructors (Default constructor, parameterised constructor)
Static method v/s instance method
Reference variable as instance member of the class
String class
Lab:
Build a class Employee which contains details about the employee and compile and run its
instance.
Build a class which has references to other classes. Instantiate these reference variables and
invoke instance methods.
Session 5: Arrays
Lecture:
• Initializing an Array in Java
• Two dimensional array in java
• Java Variable Arguments explained
• Add, update, read array elements
• Sorting and searching in array
• Java String Array to String
• How to copy arrays in Java
Lab:
Write Java programs to:
Calculate average of numbers using Array
Reverse an array
Sort an array in ascending order
Convert char Array to String
Add two Matrix using Multi-dimensional Arrays
Sort strings in alphabetical order
Find out the highest and second highest numbers in an array
Concatenate two arrays
Objective: To introduce Operating System concepts with Linux environment, and to learn Shell
Programming.
Text Books:
Operating Systems Principles by Abraham Silberschatz, Peter Galvin & Greg Gagne / Wiley
Unix Concepts and Applications by Sumitabha Das / McGraw Hill
References:
Modern operating Systems by Andrew Tanenbaum & Herbert Bos/ Pearson
Principles of Operating Systems by Naresh Chauhan / Oxford University Press
Beginning Linux Programming by Neil Matthew & Richard Stones / Wrox
Operating System : A Design-Oriented Approach by Charles Crowley / McGraw Hill
Session 2:
Lecture:
Introduction to Linux
Working basics of file system
Commands associated with files/directories & other basic commands. Operators like
redirection, pipe
What are file permissions and how to set them
Permissions (chmod, chown, etc); access control list; network commands (telenet, ftp, ssh,
sftp, finger)
System variables like – PS1, PS2 etc. How to set them
Shell Programming
What is shell; What are different shells in Linux?
Shell variables; Wildcard symbols
Shell meta characters; Command line arguments; Read, Echo
Lab:
Working with various OS commands
Shell programs related to Session 2
Session 3:
Lecture:
Shell Programming
Decision loops (if else, test, nested if else, case controls, while…until, for)
Regular expressions; Arithmetic expressions
More examples in Shell Programming
Lab:
Shell Programs related to Session 3
Sessions 4, 5 & 6:
Lecture:
Processes
What is process; preemptive and non-preemptive processes
Process management; Process life cycle
What are schedulers – Short term, Medium term and Long term.
Process scheduling algorithms – FCFS, Shortest Job First, Priority, RR, Queue. Belady’s Anomaly
Examples associated with scheduling algorithms to find turnaround time to find the better
performing scheduler.
Process creation using fork; waitpid and exec system calls; Examples on process creation;
Parent and child processes
Orphan and zombie processes
Lab: (2 hours)
Creating processes - parent and child processes
Handling orphan and zombie processes.
Session 7:
Lecture:
Signals
What are signals
Generating and handling signals
Threads
What are threads; user and kernel threads; how threads are different from processes
Thread programming using pthread.
Lab:
Assignment on signals
Assignment on threads – Thread creation, thread synchronization
Sessions 8 & 9:
Lecture:
Memory management
What are different types of memories; What is the need of Memory management
Continuous and Dynamic allocation
First Fit, Best Fit, worst Fit
Compaction
Internal and external fragmentation
Segmentation – What is segmentation; Hardware requirement for segmentation;
segmentation table and its interpretation
Paging – What is paging; hardware required for paging; paging table; Translation look aside buffer
Concept of dirty bit
Shared pages and reentrant code
Throttling
(No Lab)
Session 10:
Lecture:
Virtual Memory
What is virtual memory
Demand paging
Page faults
Page replacement algorithms
(No Lab)
Session 11:
Lecture:
Deadlock
Necessary conditions of deadlock
Deadlock prevention and avoidance
Semaphore
Mutex
Producer consumer problem
Dead-lock vs Starvation
Lab:
Semaphore, Mutex