Multi Processing/ Multi Programming/ Multi Tasking/ Multi Threading
β Multi Processing
several CPUs
- each CPU can execute different task
parallel processing
- in process, work in parallel
- operate multiple jobs at the same time
ππ» reduce time
- π οΈ used in cloud
- π οΈ multi-core
β Multi Programming
multiple programs are loadad into memory
CPU switches between them
- βοΈ several program in memory
- OS schedule which program to be run
- CPU switching
ππ» Optimize CPU usage
- π οΈ run text editor and compiler simultaneously
π‘ Paging https://soheeparklee.github.io/posts/OS-12paging/
β Multi Tasking
OS execute multiple tasks simultaneously
extension of multiprogramming, but more general sense
- Task: unit of work in OS/ command for work
- processλ³΄λ€ νμ₯λ κ°λ
- CPU switching
appears that CPU is executing two tasks at the same time
- OS handles multi tasking
- tasks have independent memory, do not share resources
- need IPC for communication between tasks
ππ» has independent memory, can be executed memory
- cooperative multitasking
preemptive multitasking: force CPU switch
- π οΈ modern OS, run web browser, text editor, music player
- general purpose OS
- run multiple Apps
β Multi Threading
multiple thread in one process
threads share resource like memory, but execute independently
- ππ» data sharing among thread
ππ» efficient communication
- π οΈ multiple client requests
This post is licensed under CC BY 4.0 by the author.