COMP 3438 System Programming

Download Report

Transcript COMP 3438 System Programming

COMP 3438 System Programming
Course Information
Welcome to:
COMP 3438
System Programming
Slide 1
COMP 3438 System Programming
Course Information
Lecturers and Tutors
Lecturer: Dr. Zili SHAO
Office: PQ721
Telephone No. : 2766-7287
Email: [email protected]
http://www4.comp.polyu.edu.hk/~cszlshao/
Consultation time: 3pm–5pm Friday
Tutors: Mr. Renhai Chen
Office: PQ 822
Telephone: 3400 3340
Email: [email protected]
http://www4.comp.polyu.edu.hk/~csrchen/
Consultation time: 3-5pm Friday
Slide 2
COMP 3438 System Programming
Course Information
System programming?
Types of software:
Application programs (e.g., e-shop, banking)
What you normally think of as a “program”
Compilers and interpreters
Programs used to write other programs
Operating system (e.g., Windows XP, UNIX)
Program that manages display, CPU, memory,
disk, tape,
Slide 3
COMP 3438 System Programming
Course Information
Layers of a computer system
Banking
System
Compiler
Airline
reservation
DBMS
Editor
Adventure
games
Command
interpreter
Assembler / Linker / Loader
Application
Software
System
Software
Operating system
Machine language
Microprogramming
Hardware
Layers
Physical devices
Slide 4
COMP 3438 System Programming
Course Information
Layers of software
Application software solve end user-specified
problems – the focus is on the application, not
on the computer system.
e.g. CAD/CAM, Finance software
e.g. spreadsheet, word processing, calculators
e.g. StudentManageSys at PolyU
System software support the operations of the
computer itself, rather than any particular
application.
O.S.
Software development tools (e.g. editors, compilers and libraries,
debuggers)
Database management, window management, networking software
System software is usually machine dependent.
Slide 5
COMP 3438 System Programming
Course Information
System programming?
Application programmer
a programmer who does programming with some application
packages, e.g.,
creating a student database using Oracle
developing a Web page using Frontpage
writing a medical imaging software using some graphics
package
System programming (also called system-level
programming)
programming and administrating of system software including
OS and those that may run directly on top of OS (i.e. directly
interacting with OS by invoking kernel functions and facilities).
System programmer
a programmer who does system programming
Slide 6
COMP 3438 System Programming
Course Information
Objectives of this subject
This subject introduces
Concepts and principles of system programming
Methods, techniques, and tools for designing and
implementing system-level programs
Software development using
OS services
Utilities and tools
We focus on
Compilers – programming language implementation
Device Driver – Operating system kernel interface
Slide 7
COMP 3438 System Programming
Course Information
Topics
Introduction to system software
Part I: Unix System programming – Unix
Device Driver Development
Basic Knowledge
UNIX programming basics
Unix processes
Unix file systems
Unix Device Driver Development
The Basics of Unix Device Driver Development
The Character Device Driver Development
The Block Device Driver Development
Experimental Platform
Embedded Linux Development Environment based on ARM
processor
Practice with real hardware
Slide 8
COMP 3438 System Programming
Course Information
Topics
Principles of compiler construction
Syntax and semantics of programming
languages
Lexical analysis
Syntax analysis
Code generation and optimization
Slide 9
COMP 3438 System Programming
Course Information
Background required
Basic knowledge in
Data structures
Programming language syntax and
grammars
Programming in C
Understanding of OS (process, file system,
etc.)
Slide 10
COMP 3438 System Programming
Course Information
Background required
Specifically, you should be familiar
with the following topics:
Logging into a UNIX system;
Creating files using one of the standard editors
provided on the system;
The tree-like directory structure presented by UNIX;
Basic commands for manipulating files and
directories;
Creating and compiling C programs (including
programs with code held in several source files);
Using command line arguments: argc and argv,
within C program;
Using system manual.
Slide 11
COMP 3438 System Programming
Course Information
At the end …
You will understand:
the role of system and application software,
the tasks of a system programmer,
the procedure and methods of implementing device
drivers
the principles and methods of designing language
compilers
the approaches to invoking OS services.
You will be able to
apply the concepts and techniques of system-level
programming,
write simple compiler modules
using tools to generate a compiler for a target
language
Unix device driver implementation.
Slide 12
COMP 3438 System Programming
Course Information
The Course Organization of COMP 309 (Bottom-up)
Part I: Unix System Programming
(Device Driver Development)
Character
Device Driver
Development
(HW #2)
Introduction
to Block
Device
Driver
Overview of Device Driver
Development
Process/File System (HW #1)
Overview of Unix Sys. Prog.
Part II:
Compiler Design
Syntax Analysis
(HW #4)
Lexical Analysis
(HW #3)
Overview of
Complier Design
Overview of the Subject (COMP 3438)
Slide 13
COMP 3438 System Programming
Course Information
Course materials
Blackboard Homepage:
http://learn.polyu.edu.hk
Textbooks:
A.V. Aho, M. Lam, R. Sethi and J.D. Ullman, “Compilers: Principles,
Techniques, and Tools”, Prentice Hall; 2 edition, 2006.
Kay A Robbings and Steven Robbings, “Unix Systems
Programming”. Prentice Hall PTR. (2003)
G. Pajari, “Writing Unix Device Drivers”, Addison-Wesley Publishing
Company, 1993.
Supplementary reading:
textbooks in compilers and Unix programming (many, see Syllabus
for a list of references)
References (Device Driver) will be posted on WebCT
Slide 14
COMP 3438 System Programming
Course Information
Teaching methods
Teaching Mode:
Lectures:
39 Hours
Lecture notes (slides) are provided on the
Blackboard
I may use whiteboard or powerpoint (or both),
depending on what to teach.
Tutorial/Lab: 13 Hours
Assignments
Self-readings
Group discussion
Slide 15
COMP 3438 System Programming
Course Information
Labs
All labs will be held in PQ 606
We will use ARM-based embedded boards
(Android-pad) in the lab
During the lab, the tutor will introduce the basic
idea of the lab, and show the procedure how it
works.
You may need to conduct hands-on
experiments by using other time based on labs
provided.
Slide 16
COMP 3438 System Programming
Course Information
Assessment
Continuous assessment: 55%
Labs & Tutorials (Simple questions) 5%
Class exercises
5%
Four Assignments
35%
Assignment 1 Assignment 2 Assignment 3 Assignment 4 -
Process and File (5%)
Device Driver (10%)
Lexical Analyzer (10%)
Syntax Analyzer (10%)
(Late assignment: 20% deduction per day
e.g., 1 minute or 23 hours late  deduct 20% )
1 Mid-term Test (10%)
Examination (2 hours): 45%
Slide 17
COMP 3438 System Programming
Course Information
Finally, some requests …
You are strongly encouraged to attend the lectures and
the tutorial/Lab sessions
Lecture notes posted on the web may cover a lot of things, but I
will only teach the most important things that are only parts
required for the exam
Believe me, you will easily get lost if you don’t come to the class –
This may be one of the most difficult subjects in our department
Welcome to ask questions and actively participate in
the classroom.
Please make your best effort to arrive at the
classroom on time. If you come late, try your best not
to disturb the classmates.
If you have questions, ask me so other students can
benefit.
Slide 18