COMP 3430 Operating Systems
Course introduction + Processes
Franklin 24th, 2022
Copyright By PowCoder代写 加微信 powcoder
By the end of today’s lecture, you should be able to:
▶ Describe the basic responsibilities and organization of an operating system.
▶ Compare and contrast processes and
The Rocket Book (Public Domain)
WICS, CSSA, devClub
Welcome Anna, Nicoli, and Mark!
Apple Macintosh System 1 (Fair use)
With your team, do the following:
1. Introduce yourself .
▶ What was your first OS?
2. Nominate someone to create a shared
space for taking notes.
3. Choose a team name (share in chat on
your return).
4. Answer the question: What is an OS?
Linux kernel system call interface ( © CC BY-SA 3.0)
Launching a process
Let’s launch some processes on aviary.
Launch! © /DLR (CC BY 2.0)
Relationship?
With your team, answer:
What do these processes share?
Sharing is caring (Pixabay License)
Launching a process
▶ That’s how we launch a process… ▶ What happens after we press Enter?
▶ The book describes the process.
▶ … but leaves the implementation as an
▶ Let’s take a look.
Our amazing (and free) textbook. ©RH & AC Arpaci-Dusseau
What is a program?
▶ Let’s take a big step back: What even is a program?
▶ That is, what’s the result of clang -Wall myprog.c -o myprog (do not overthink this…)
▶ A program is literally a file.
▶ A binary, ELF-formatted file (on a Linux
system…)
▶ Let’s take a closer look at an ELF file.
▶ So… a program is a file
▶ HowdoyoureadafileinC?
It’s a file! Pixabay License
Programming Practices January 24th, 2022
By the end of today’s lecture, you should be able to: ▶ Read files in C.
Reading files in C
▶ Start with #include
2. Check the value that was returned. 3. fgets, fgetc, … wait.
Reading! Pixabay License
(Back to 3430)
▶ What kind of data do these functions deal with? ▶ What kind of data is in an ELF formatted file?
▶ Most importantly: Where do these functions come from?
What is an OS?
Linux kernel system call interface ( © CC BY-SA 3.0)
▶ An OS first needs to read a program to launch it.
▶ The program is read into a data structure (in memory)
▶ The data structure maintains metadata about the running
▶ The data structure includes an address where the program
starts in memory. ▶ …what’s next?
▶ JMP/JSRR/JSR main
▶ A question for next time: What state is a process in when it
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com