系統程式設計 Systems Programming 鄭卜壬教授臺灣大學資訊工程系 Tei-Wei Kuo, Chi-Sheng Shih, Hao-Hua Chu, and Pu-Jen Cheng 2008
Goal of SP Course You are expected. to be familiar with the UNIX-like systems to become good system programmers Server Client
UNIX! Created by Ken Thompson & Dennis Ritchie at Bell Lab in 1969 & on PDP-7.! ACM Turing award winners for the design of UNIX in 1983.! C programming language inventor: Dennis Ritchie.! Supports many users running many programs at the same time, all sharing the same computer system! Major Contributors:! Bell Laboratories, Computer Systems Research Group (CSRG) of the University of California at Berkley (released in BSD), UNIX System Laboratories (USG/USDL/ATTIS/ DSG/USO/USL), etc.
PDP-7 PDP-11 (1972) Ken (sitting) & Dennis (standing) D. Ritchie and K. Thompson, The UNIX Time-Sharing System, CACM Vol.17, No.7, pp.365-375, 1974
UNIX UNIX System Laboratories (USG/USDL/ ATTIS/DSG/ USO/USL) System V Release 2,3 Bell Labs Research First Edition Sixth Edition Seventh Edition XENIX MINIX Berkley Software Distributions 1BSD,, 4.0BSD Chorus UNIX System V Release 4 Mach SUNOS Solaris Solaris 2 * POSIX.1 (IEEE, ISO) standard! 4.3BSD 4.3BSD Tahoe 4.3BSD Reno 4.4BSD Lite Tei-Wei Kuo, Chi-Sheng Shih, Hao-Hua Chu, and Pu-Jen Cheng 2007
! Required Text Book! Advanced Programming in the Unix Environment by W. Richard Stevens and Stephen A Rago, Addison- Wesley, 3rd Edition, 2013. (source code: http://www.apuebook.com)! Reference Book:! Understanding UNIX/LINUX Programming: A Guide to Theory and Practice by Bruce Molay, Prentice Hall, 2002.! The Art of UNIX Programming by Eric S. Raymond. http://www.faqs.org/docs/artu/! Prerequisites:! Basic C/C++ programming skill! Getting started with UNIX:! A material from Stanford (https://goo.gl/tkg39f) Compile, link & debug program, gcc, make, gdb, shell commands Tei-Wei Kuo, Chi-Sheng Shih, Hao-Hua Chu, and Pu-Jen Cheng 2008
W. Richard Stevens (1951~1999) Ph.D. (Systems Engineering), Univ. of Arizona, 1982 http://www.kohala.com/start/ http://en.wikipedia.org/wiki/w._richard_stevens
Administration Misc.! Class slides & assignment specifications http://www.csie.ntu.edu.tw/~pjcheng/course/sp2018! Assignment submission & grades https://ceiba.ntu.edu.tw/1071csiesp/! Office hours R323, 9:00~12:00, Friday! Forum ptt2: SysProgram board
Topics to be Covered! Basic OS Preface/Introduction! File I/O! Standard I/O Library! Files and Directories! System Data Files and Information (optional)! Environment of a Unix Process! Process Control & Relationships! Signals! Inter-process Communication! Thread Programming! Network Programming
Grading Criteria! Mid-term exam: 30%! Final exam: 30%! Several hand-written exercises: 8% 4 programming assignments: 32%! Not allow to deliver hand-written exercises late! Late for programming assignments: -5% for each day delay! Plagiarism: no credit
Relation to Other CS Courses! Prescribed courses! Programming language! Introduction to computer programming! Data structures and algorithms! Systems programming (this course)! System! Operating systems, computer network! Advanced courses! Cloud computing, large-scale information system, embedded system
It s important to schedule your time wisely