0-CourseInfo
0-CourseInfo
Eric Lo
0-Course Info
Why we have to learn OS?
• If you want to work for MS Windows, RedHat, Vmware,
VirtualBox
• If you want to work for Nvidia, HP
– Writing drivers
• If you want to work for Google, Facebook
– Interview Question: “Why the maximum file size in an USB
(FAT32) is 4GB?”
• If you want to be (or avoid) a hacker
• If you want to be a system administrator
– 20-80 system admin vs. programmer
– Who has a higher salary?!
• If you need to design a new system named vLLM
2
What’s an Operating System?
• Is your tiger mom
– Let you focus on your homework by freeing you about
• Scheduling
– Won’t conflict with your siblings
– Never waste your time
• Where your books are
• Many details behind
3
What’s an Operating System?
• Is a software
– Let you focus on your homework by freeing you about
• Scheduling
– Each application gets a CPU share
– Never waste your CPU
• Where your files are located on which “sector” your HD
• Many details behind
4
History of OS
• Before 1945
– Specialized purpose computer
• Program logic was hardwired in a computer
• 1945
– John von Neumann proposed a “stored-program”
general purpose computer
• A core set of instructions
– Instead of hardwired program
• Programs are formed by sequence of instructions
• Keep the programs in the storage
• Human Operators load that program from the storage and the
computer executes the instructions
http://www.osdata.com/kind/history.htm 5
Around 1950 – Batch System / Mainframe
– People submit programs
– Keep the programs in the storage
– Operating System loads those programs one-by-one
from the storage and the computer executes the
instructions
6
Early 1960s – Time Sharing
• The operating system gives each program in the
queue a time slice in a rotational manner
– Also introduce priority to jobs
• So that, to all users who have submitted jobs
– they all have progress
• instead of waited for 15 days and then halted by a bug
7
Early 1970s - UNIX
8
Early 1970s - UNIX
• AT&T agreed to release UNIX as an open source
operating system for academic use.
• Ken Thompson, one of the originators of UNIX and
C, took UNIX to the UC Berkeley
10
>1974s – Personal Computer
• With the development of LSI (Large-Scale
Integration) circuit
– Price dropped
– Size dropped
• Intel 8080
– First general purpose 8-bit CPU
• In early 1980s, IBM made the first IBM PC
– Contacted Gary Kildall to make the OS
• Gary Kildall made the probably the worst business decision in
history
11
1980s
• Then IBM contacted Bill Gates
– who had made a BASIC interpreter
• bought DOS (Disk Operating System) from a Seattle Computer
company
• Grabbed the DOS developer to customize it
• Sold it to IBM as MS-DOS
12
1980s
13
1990s - Linux
• UNIX* was not free when not for educational
purpose
• In 1991, Linus Torvalds, a university student in
Finland, developed Linux without using any UNIX
code.
• Totally open license model
– Free even for commercial
14
C Sanity Check
• What’s the size of a pointer?
• What’s .DLL?
15
After this course, you shall know…
https://ahaslides.com/0LQ2X 16
Piazza
• Lecture notes, assignment, source codes demo during
the lectures, exercises, announcement…
– Discussion Board
• Healthy questions are welcome
– E.g., “why that can cause segmentation fault?”
• Unhealthy questions are discouraged
– E.g., “how many scores do I need in exam in order to pass?”
– E.g., Questions that come from skipping (or sleeping in / daydreaming
during) the lectures/lab
– E.g., Problems arise from you insist to test your assignments on Windows
– Private messages through Piazza
• No Email!
• Private Message usage example:
– Send us your answer of past mid-term/final for comments
• Private Questions that should be public get low/no priority
17
Assessment (tentative)
• Continuous Assessment (40%)
– 1 Warm-up Assignment A0 (1%)
– 3 Programming Assignments (24%; @8)
• A1: Shell (@8)
• A2: Multi-Thread Scheduler (@8)
• A3: File System (@8)
– 1 Mid-Term (15%; 20 Feb)
• Absence with strong justification (e.g., medical proof) will give you:
– CA: Final = 25 : 75 instead of 40 : 60
• Final (60%)
• 10% Bonus
– Bash Script (5%)
– To encourage student participation (5%)
• Your # of “endorsed answers” FYI:
# of Piazza’s ”endorsed answers”x 5% Last offering, 50 endorsed answers
18
Lab 1
Lab Users
linux> ls -l
Labs 2 – 3
Advanced users
#!/bin/bash
Labs 3 - 10
System Programmer
fork(), mmap()
Labs 8 – 13
20
Why Linux?
21
Programming Assignments
• All test cases are given
• Grader is given
• No unseen test cases
• What scores you see (in our course VM) is what
you get
– So, test your program on our course VM before you ask
– So, incomplete/un-compilable code won’t get scores
22
Programming Assignment Deadlines
You actually
get instant
Assignment Deadline Late Penalty feedback from
A0 (Warm-up) 1% 23 Jan, 11am 100% our test suite
23
Reminder
• OS course is tough
– And it should be
– Programs must pass test cases to gain scores
• Suggestion: don’t take too many major when you
take this course
• Exam cover EVERYTHING in this course
24
Use of AI in the assignments
• Allowed AI tools
– Any AI model, e.g. GPT-4o, that causes no ethical issues.
• Acknowledge your use of AI tools in
ai_declaration.txt
25
Acknowledgement, References, and Disclaimer
• Source codes on the notes, mid-term, exam are
mostly pseudocode
– Not directly compliable
• Some notes and examples are extracted from Dr. TY
Wong’s previous offering
• Google Images, Stackoverflow
26
Reference
• Google / Youtube
• GPT!
• Past mid-term (with answers) and finals are given
– Note: the schedule/content of each term varies, so just
take those as a reference only
27