Unit 2: Introduction to UNIX and Linux
CptS 360 (System Programming) Unit 2: Introduction to UNIX and Linux
Bob Lewis
School of Engineering and Applied Sciences Washington State University
Spring, 2020
Bob Lewis WSU CptS 360 (Spring, 2020)
CptS 360 (System Programming) Unit 2: Introduction to UNIX and Linux - - PowerPoint PPT Presentation
Unit 2: Introduction to UNIX and Linux CptS 360 (System Programming) Unit 2: Introduction to UNIX and Linux Bob Lewis School of Engineering and Applied Sciences Washington State University Spring, 2020 Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ a system boots? ◮ you log in? ◮ you log out? ◮ a system shuts down?
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ if unsuccessful, login(1) exits and control returns to (1) ◮ if successful, login(1)... ◮ cd’s to your new directory ◮ starts up your shell
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ [Steven]
◮ Bell Labs
◮ [Bill Joy] C
◮ UC Berkeley
◮ [David] Korn shell ◮ AT&T Bell Labs
◮ “Bourne-again” shell ◮ net-developed
◮ ”z shell” ◮ ”...” ◮ huge
◮ [Kenneth] Almquist shell ◮ teensy ◮ used for diagnostics & small systems Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ function prototypes (borrowed from C++) ◮ generic pointers (void *) ◮ international character sets (ISO 8859) ◮ very portable (arguably more so than C++)
◮ inline functions ◮ new types (long long int, complex) ◮ vararg macros ◮ // comments
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
http: //www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ positive integers ◮ uniquely identify a user or group
◮ notify process that some error has occurred ◮ may have “handlers”
◮ time-of-day ◮ CPU usage ◮ elapsed time (time interval) Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ SVr4 ◮ 4.4BSD ◮ FreeBSD (for Intel) ◮ NetBSD (for all platforms) ◮ OpenBSD (secure)
◮ Linux ◮ MacOS X
◮ Solaris
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
◮ static ◮ dynamic (most system libraries are this)
◮ IEEE Std. 1001.1-1989 (a.k.a. ISO/IEC 9945) ◮ includes commands and the API (threads, real-time, IPC, etc.) ◮ supported just about everywhere, except Windows, ◮ Interix environment subsystem (up to and including Windows
◮ deprecated in Windows 8 ◮ alternatives: Cygwin (separate library), MinGW (built-in) ◮ this class mostly concerns the API (POSIX.1[abc])
Bob Lewis WSU CptS 360 (Spring, 2020)
Unit 2: Introduction to UNIX and Linux
Bob Lewis WSU CptS 360 (Spring, 2020)