Course Overview CS 344 – Operating Systems I

advertisement
Course Overview
CS 344 – Operating Systems I
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
1
July 24, 2016
Syllabus: Course Website
• http://classes.engr.oregonstate.edu/eecs/winter2015/cs344-501/
2
July 24, 2016
Syllabus: Contact Information
• Dr. Marc Rubin
• Cascades Hall 212 (new office!!)
• marc.rubin@osucascades.edu
3
July 24, 2016
Syllabus: Office Hours
• Cascades Hall 212
• Mondays and Wednesdays, 13:00 – 14:00
• PLEASE COME TO OFFICE HOURS FOR HELP!!
4
July 24, 2016
Syllabus: Textbook
• “The Linux Programming Interface” by Michael Kerrisk
5
July 24, 2016
Syllabus: Grades
• 50% Homework
• 25% Midterm
• 25% Final
• Cheating will NOT be tolerated.
• if you cheat, I WILL report you
6
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
7
July 24, 2016
Course Objectives
• Explain why multiprogramming is important for modern
operating systems.
• Explain the general structure of a multiprogrammed operating
system.
• Explain the purpose and operation of system calls.
8
July 24, 2016
Course Objectives
• Write a program utilizing system calls.
• Write a program using a scripting language.
• Write a program that uses regular expressions to parse input
data.
9
July 24, 2016
Course Objectives
• Write a program that spawns processes and provides mutual
exclusion for variables or other resources shared by the
processes.
• Write a program that uses sockets to implement a client/server
system.
10
July 24, 2016
Course Objectives
• Explain how a common file system works, including structure,
I/O operations, and security.
• Describe the memory organization of a typical process in a
common operating system.
11
July 24, 2016
How to Learn…
12
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
13
July 24, 2016
Schedule
• Detailed course schedule on website
• OS I: system calls
•
•
•
•
•
•
File I/O
Processes
Threads
Sockets
Time
etc.
• OS II: Kernel
14
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
15
July 24, 2016
Required Software
• In accordance with Corvallis, we will use Linux OS
16
July 24, 2016
Required Software
• OSU students get VMWare for free
• via OSU TEACH
• Download the virtual Linux image from course website
• Compatible with VMWare
• Should have all required course software for OS I
• http://classes.engr.oregonstate.edu/eecs/winter2015/cs344501/virtual_machine.zip
17
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
18
July 24, 2016
History of UNIX
•
•
•
•
•
•
•
•
First implemented in 1969 at Bell Laboratories (AT&T)
1973 UNIX rewritten in C programming language
Cheap OS used to teaching CS at universities
1979- BSD UNIX released by Berkeley
1980s- GNU project begins
1991- working Minix kernel for x86
C language standardized in 1989
no Official UNIX or Linux distribution
19
July 24, 2016
History of UNIX
why I use a Mac
20
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
21
July 24, 2016
C/C++ Refresher
• Biggest difference between C/C++ and Java?
• MEMORY MANAGEMENT!
• You are in charge of allocating / deleting memory!
• Live coding demo:
•
•
•
•
•
printf()
scanf()
struct
malloc() / free()
C-style strings
22
July 24, 2016
Outline
•
•
•
•
•
•
•
Syllabus
Course Objectives
Schedule
Required Software
History of UNIX
C/C++ Refresher
bash Scripting
23
July 24, 2016
bash Scripting
• bash is a Linux shell program
• other types exist (e.g., sh, csh, tsh, etc.)
• bash scripts used to automate tasks
•
•
•
•
•
Generate test input
Evaluate program output
Find stuff using regular expressions
File manipulation
etc.
24
July 24, 2016
bash Scripting
• bash scripts utilize existing Linux tools
• e.g., sed, awk, grep, sort, diff, etc.
• bash scripts execute user processes
• Great for automated testing
• Live coding example:
• Command line arguments (letter, filename)
• grep to find letter in file
25
July 24, 2016
bash Scripting (resources)
• grep and regular expressions
• http://www.robelle.com/smugbook/regexpr.html
• bash scripting
• http://web.engr.oregonstate.edu/~rubinma/Linux_course/Content/Slides
/15_scripting.pdf
• man page(s)
• UNIX> man grep
• UNIX> man sed
• UNIX> man awk
26
July 24, 2016
Questions?
27
July 24, 2016
Download