์ด์์ฒด์ ๋
- An operating system is a software that operates a computer system.
- A computer is a machine that processes the information.
- An information can be defined as a quantitative representation that measures the *uncertaint
์ปดํจํฐ์ ์ ๋ณด ์ฒ๋ฆฌ
- ์ ๋ณด์ ์ต์ ๋จ์: bit(binary digit)
- ์ ๋ณด์ ์ฒ๋ฆฌ: ์ ๋ณด์ ์ํ ๋ณํ (0 -> 1 or 1 -> 0)
- Boolean Algebra: NOT, AND, OR
- ๋ ผ๋ฆฌ ๊ฒ์ดํธ: NOT, AND, OR, XOR, NAND, NOR
- ๋ ผ๋ฆฌํ๋ก: IC, LSI, SoC, ...
- ์ ๋ณด์ ์ ์ฅ๊ณผ ์ ์ก: Flip-Flop, Data Bus
์ปดํจํฐ์ ์ฐ์ฐ ์ฒ๋ฆฌ ๋ฐฉ์
- ๋ง์ : ๋ฐ๊ฐ์ฐ๊ธฐ, ์ ๊ฐ์ฐ๊ธฐ
- ๋บ์ : 2์ ๋ณด์ ํํ๋ฒ
- ๊ณฑ์ & ๋๋์ : ๋ง์ ๊ณผ ๋บผ์ ์ ๋ฐ๋ณต
- ์ค์ ์ฐ์ฐ: ๋ถ๋ ์์์
- ํจ์: GOTO
- ์ด๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ค์ํ ์์ ์ ์ํ
์ปดํจํฐ๋ ๋ค์ ์กฐ๊ฑด์ ์ถฉ์กฑํด์ผ ํ๋ค
Universality(๋ฒ์ฉ์ฑ)
- NOT, AND, OR ๊ฒ์ดํธ๋ง์ผ๋ก ๋ชจ๋ ๊ณ์ฐ์ ํ ์ ์๋ค.
- NAND ๊ฒ์ดํธ๋ง์ผ๋ก ๋ชจ๋ ๊ณ์ฐ์ ํ ์ ์๋ค.
- General-purpose computer(๋ฒ์ฉ ์ปดํจํฐ)
Computability(๊ณ์ฐ๊ฐ๋ฅ์ฑ)
- Turing-computable: ํ๋ง ๋จธ์ ์ผ๋ก ๊ณ์ฐ๊ฐ๋ฅํ ๊ฒ.
- Halting Problem: ํ๋ง ๋จธ์ ์ผ๋ก ํ ์ ์๋ ๋ฌธ์ .
์ปดํจํฐ์ ํ์
- Alan Turing - Turing Machine
- John von Neumann - ISA(Instruction Set Architecture)
Turing Machine
- Alan Turing์ด ํ๋ ์ปดํจํฐ์ ์ํ์ ์ ์ํจ

ISA
- Neumann์ด stored-program ๋ฐฉ์์ ์ฒ์์ผ๋ก ์ ์
- A stored-program computer is a computer that stores programs in a memory.
- Memory์์ Instruction์ fetch๋ฅผ ํด์ค๊ณ CPU์์ Executeํ๋ ๊ตฌ์กฐ

- ๋ฐ๋ผ์, a program is a set of instructions that tells a computer's hardware to perform a task.
์ด์์ฒด์ ๋ ํ๋ก๊ทธ๋จ์ ์ผ์ข
- Operating System
- is a program running at all times on the computer
- to provide system services to application programs
- to manage process, resources, user interfaces, and so on.
What Operating Systems Do
- An OS is a software that manages a computer's hardware.
- It also provides a basis for application programs and acts as an intermediary between the computer user and the computer hardware.
Four components of computer system
- The hardware
- The OS
- The application programs
- And a user

Defining Operating Systems
- There are NO universally accepted definition of an operating system.
- A more common definition is that
- the one program running at all times on the computer usually called the kernel.
- Along with the kernel, there are two other types of programs
- system programs
- application programs
Computer-System Organization
- A modern computer system consist of
- one or more CPUs and
- a number of device controllers connected through a common bus.

Bootstrap
A bootstrap program is the first program to run on computer power-on, and then loads the OS.
Interrupt
Hardware may trigger and interrupt at any time by sending a signal to the CPU, usually by way of the system bus.

von Neumann architecture
- A typical instruction-execution cycle
- first fetches an instruction from memory
- and stores that instrcution in the instruction register.
- The instrcution is then decoded
- and may cause operands to be fetched from memory
- and stored in some internal register.
- After then instruction on the operands
- has been executed,
- the result may be stored back in memory.
Storage systems
The wide variety of storage systems can be organized in a hierarchy according to
- storage capacity
- and access time

I/O Structure
A large portion of OS code is dedicated to managing I/O

Computer System Architecture
- Definitions of Computer System Components
- CPU: The hardware that executes instructions
- Processor: A physical chip that contains one or more CPUs.
- Core: The back computation unit of the CPU.
- Multicore: Including multiple computing cores on the same CPU.
- Multiprocessor: Including multiple processors.
Symmetric multiprocessing (SMP)
- The most common multiprocessor systems, in which each peer CPU processor performs all tasks.
- Asymmetric multiprocessing: each processor is assigned a specific task.

Multi-core design
- With several cores on the same processor chip.

Operating System Operations
Multiprogramming
- runs more than one program at a time.
- keeps several processes in memory simultaneously.
- to increase CPU utilization.

Multiprocessing (=multitasking)
- a logical extension of multiprogramming.
- in which CPU switched jobs so frequently that users can interact with each job while it is running.
- CPU scheduling
- If several processes are ready to run at the same time, the system must choose which process will run next.
User mode & Kernel mode
- Two separate mode of operations: user mode and kernel mode to ensure that an incorrect program.
- cannot cause other programs to execute incorrectly

Virtualization
- Virtualization is a technology that allow us
- to abstract the hardware of a single computer
- into several different execution environments.
- VMM: Virtual Machine Manager
- VMware, XEN, WSL, ...

Operating System Services
- OS provides an environment for the execution of programs.
- User interface
- Program execution
- I/O operation
- File-system manipulation
- Communications
- Error detection
- Resource allocation
- Logging
- Protection and securit

User and Operating System Interface
- Three fundamental ways for users to interface with the OS
- CLI: command line interface, or command interpreter
- known an shells: sh, bash, csh, tcsh, zsh, etc
- GUI: graphical user interface
- Windows, Aqua for MacOS, KDE/GNOME for Linux, etc
- Touch-Screen Interface
- Android UI, iPhone UI, etc
- CLI: command line interface, or command interpreter
System calls
- System calls provides an interface to the services made available by the OS
- API: Application Programming Interface


