You are on page 1of 8

COURSE TITLE: Linux System Programming

INSTRUCTOR NAME:
SOFTWARES USED/ TOOLS USED: Ubuntu , Vim Editor, Eclipse
OVERALL COURSE DURATION: 12 hours
PROJECTS DURATION:
-----------------------------------------------------------------------------------------------------------------------------
A course curriculum should have the following mandatory fields:
● Topic title for each Day’s content
● 5-6 subtopics/detailed descriptions for every topic
● Min of 2 industry-oriented Projects - 300 marks/project with relevant images
● 1 challenge or assignment/day of content - 100/150 marks per challenge
(Numericals/Empirical/Application based questions)
● Technical jargon can be used
● One relevant high-resolution image/week of content - (ie) A total of 12 images need to be
submitted along with the syllabus
● The Instructor should propose the duration that will be taken to explain the concepts on a
respective day.

TOPIC TITLE SUB-TOPICS (5-6 BULLET POINTS)


WITH A
SESSIONS
RELEVANT
IMAGE
Introduction to Linux ● OS Architecture, Kernel, System calls
Day 1:
(Instructor OS ● Memory Management
should ● Tracers – strace, ltrace
propose the ● Interrupts. Types of Interrupts, ISR, Interrupt Vector
duration)
Table
● Things CPU does after getting Interrupt
Day 2: Process Management ● Process Life Cycle
(Instructor & Signals ● Process commands in Linux(Theory,Code)
should
● Overview of system calls – fork, waitpid
propose the
● Concept of signal handling, commands
duration)
● Creating child process using fork(Theory, Code)
● waitpid(Theory, Code)
● Process Scheduling
● Catching signal using sigaction(Theory, Code)
Multithreading ● Concept of threading
● Creating Threads (using pthread) (Theory, Code)
Day 3:
(Instructor ● Thread Attributes
should ● User Space, Kernel Space Threads
propose the ● Memory Layout of Thread
duration)
● Creating Threads in C++ (Using Thread class)
● Creating Threads in C++ (Using Functor)
Inter Process ● Race conditions, Critical Section, Mutual exclusion
Communication ● Context Switch, Deadlock, Bound waiting, Busy
Day 4: waiting
(Instructor
● Semaphores, Mutex (Difference, Theory, Code)
should
● shared memory(Theory, Code)
propose the
duration) ● message queue(Theory Code)
● Condition Variables(thoery & code)
● spin lock(thoery & code)
Socket Programming ● Socket Programming (Theory, Code)
& File Handling ● Virtual File System (VFS)
Day 5:
(Instructor ● Low level file handling
should ● Hard and Soft links
propose the ● File permissions and ownership
duration)
● Pipes & FIFOs

Additional System ● Clock & Timers - std::chrono::duration


Day 6:
(Instructor Programming ● POSIX. vs System V
should Concurrency ● POSIX APIs: exec(), fcntl()
propose the ● std::async & std::future
duration)
● std::promise
● Atomic Operations - std::atomic
● Locking Techniques - std::unique_lock,
std::lock_guard, std::mutex,
● std::condition_variable
Project Title Detailed Description of the Project:
( 10 lines with 2 relevant images from the project is
mandatory)

Create own Shell using (fork(), waitpid()) commands. Atleast


implement these 3 commands:
- Redirect output to file(using dup2())
PROJECT 1
- Implement pipe (cat test.txt|grep a) (using execvp())
(300 Marks)
- Running job in background
- Enviornment: Linux Ubuntu OS.
Min duration
- IDE: Eclipse IDE for C/C++ Developers
to complete a
- Tools: valgrind, gdb, lcov, doxygen
project (by
- Repository: GitHub
student): 80
hours

(Ideally, a
student
should invest
a min. of 40
hours
working on
each of the
projects
created by
the
instructor)
● Key Highlights (5 pointers)
- Project will use Student’s knowledge of Threads,
Processes, waiting on process id etc.

● Deliverables
- Actual working code
Time is taken to complete the challenge to be mentioned here, by the instructor:
Project Title Detailed Description of the Project:
( 10 lines with 2 relevant images from the project is
mandatory)

Calculate Median of Huge float array


- 4 Threads(representing 4 nodes). Each calculate its
median(med1, med2, med3, med4). All Nodes send Median
to name node(ie main), which shows overall median.
PROJECT 2
- std::thread
(300 Marks)
- std::promise
- std::future
Min duration
- boost::asio::io_service io_service;
to complete a
project (by
student): 40
hours

(Ideally, a
student
should invest
a min. of 40
hours
working on
each of the
projects
created by
the
instructor)

● Key Highlights (5 pointers)


- Student will learn about C++ Threading,
promise, future.
- C++ std::threads
- Boost library
● Deliverables
- Actual working code calculating the mean of
10k float numbers

Time is taken to complete the challenge to be mentioned here, by the instructor

Points to be kept in mind while creating the challenges:

● Instructor to create one challenge/week of content - Mandatory as part of curriculum deliverable


● A student should spend a min of 4-5 hours working on each challenge
● Each challenge will be 100 to 150 marks
● It can have a mix of numerical/ empirical or application-oriented questions
● MCQ’s can be avoided but in some special cases, each challenge should have a minimum of 15
MCQ questions with 4 options
● The minimum Duration spent by the student to complete the Challenge should be mentioned by
the Instructor and also mention the marks to be provided for each challenge.

CHALLENGES QUESTIONS (Any necessary information and MARKS/CH


reference materials for students to complete the ALLENGE
challenges needs to be submitted by the instructor)
1. Write a program using system call open(), read(), write() 100
Day 1
Min duration to close(), del() to write “Hello World” into file
complete this 2. Using strace find how string is written into file.
Challenge ( By 3. Check file is properly closed and deleted, which
the student: )
completes the challenge.
Day 2 1. Create 2 child processes of main() process. 100
Min duration to 2. Check how many process are there in total using linux
complete this
command, should be 3.
Challenge ( By
the student: )
3. 1 child process should write into a file, other child
process should read and print on console until any of
child process dies.
Create ping pong game using 2 threads. Using pthread_create() 150
and pthread_cond_wait() is mandatory.
1 thread should print “ping”
Other thread should print “pong” alternately.
And after 10 prints process should exit.
Day 3 Ping,j:1
Min duration to
Pong,j:2
complete this
Ping,j:3
Challenge ( By
the student: ) Pong,j:4
Ping,j:5
Pong,j:6
Ping,j:7
Pong,j:8
Ping,j:9
Pong,j:10
Create ping pong game using 2 threads synchronized using 100
semaphores. Using sem_wait() and sem_post() is mandatory.
1 thread should print “ping”
Other thread should print “pong” alternately.
And after 10 prints process should exit.
Day 4 Ping,j:1
Min duration to
Pong,j:2
complete this
Ping,j:3
Challenge ( By
the student: ) Pong,j:4
Ping,j:5
Pong,j:6
Ping,j:7
Pong,j:8
Ping,j:9
Pong,j:10
Create a bookmyshow application using socket programming. 150
Consider use case of only 1 Cineplex having 5 theaters in it.
Let movies run in theaters from 9AM to 9 PM only and each
movie’s duration is 3 hours only.
Day 5
Min duration to Server should accept connections over socket, send
complete this acknowledgement over socket and store customer’s
Challenge ( By name,age,unique_id_proof in its data structure(you can use 3
the student: )
dimensional array) and send Ticket back to customer over
socket.

if you can design this as multithreaded, it will plus.


Create two threads using thread class. 100
Day 6
Min duration to Take atomic array of 10 integers
complete this 1st thread writes values to atomic array
Challenge ( By 2nd thread reads and calculates sum from atomic array.
the student: )
Do we need conditional_variable here?

QUESTIONS FOR THE INSTRUCTOR


● Who can take up this course?

Any student or professional working in industry.

S. NO TOP RECRUITERS FOR THIS SKILL SETS NEEDED FOR STUDENTS TO


DOMAIN GET PLACED WITH THESE RECRUITERS
1. Facebook Linux, system programming, Processes and threads
2. AMD, Intel Linux, system programming, Processes and threads,
Motherboard internals, device drivers
3. Broadcom, Cisco, Palo Alto, Juniper Linux, system programming, Processes and threads,
Device drivers, Networking
3. What is included in your course?
• OS Architecture, Kernel,
• Process & Process Life Cycle, Process Scheduling
• Threads and Memory Layout of Thread
• Interprocess communication(Semaphores, Mutex, shared memory, message queue)
• Socket Programming
• Virtual File System (VFS)
• Atomic Operations & Locking Techniques
4. What will the student gain from your course?
Linux Operating System internals knowledge
5. What software skills are you teaching and how well are these tools used in the industry?
• OS Architecture, Kernel,
• Process & Process Life Cycle, Process Scheduling
• Threads and Memory Layout of Thread
• Interprocess communication(Semaphores, Mutex, shared memory, message queue)
• Socket Programming
• Virtual File System (VFS)
• Atomic Operations & Locking Techniques
Every company uses these skills.

6. What are the real-world application for the tools and techniques will you teach in this
course?
CentOS, Ubuntu, Red Hat Linux are Linux operating systems. Datacenters are built on Linux OS.

7. How is your course going to help a student's path to MS or Ph.D.?


MS, PhD have Computer Architecture Chapters which contains similar content as this course.

8. How is this course going to help a student get a job?


Linux was and will always be in High demand.

9. What are the job opportunities in this field?


Person taking this course can become:
- Software Engineer
- System Admin

You might also like