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.