Post

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

Screenshot 2024-09-10 at 16 26 51

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.