Android Programming Lecture 8 Multi-threading
Android Programming Lecture 8 Multi-threading
Timesharing Operating Systems All modern operating systems are capable of sharing processor(s)between multiple users and processes o Process scheduling algorithms There are often lots (hundreds)of processes running o Many are managed by the system o Some are user executed Adobe
Timesharing Operating Systems • All modern operating systems are capable of sharing processor(s) between multiple users and processes o Process scheduling algorithms • There are often lots (hundreds) of processes running o Many are managed by the system o Some are user executed 2
Process A process is typically defined as execution of a single program on a computing device o Processes are scheduled by the OS o Processes are owned by a user or the OS(root) o Processes may have a long lifetime (a web server)or a short lifetime(one run of a short program) o Processes do not share memory between each other o Most OS support inter-process communication 路
Process • A process is typically defined as execution of a single program on a computing device o Processes are scheduled by the OS o Processes are owned by a user or the OS (root) o Processes may have a long lifetime (a web server) or a short lifetime (one run of a short program) o Processes do not share memory between each other o Most OS support inter-process communication 3
Threads A thread is a component of a process o Usually considered the smallest unit that can be scheduled by an OS o Can share memory and instructions with other threads in the same process o Most OS support inter-thread communication
Threads • A thread is a component of a process o Usually considered the smallest unit that can be scheduled by an OS o Can share memory and instructions with other threads in the same process o Most OS support inter-thread communication 4
Process V.S.Thread Differenco betwveen process+ad one tread of contol 众Second https://www.youtube.com/watch?v=O3EyzlZxx3g
Process V.S. Thread https://www.youtube.com/watch?v=O3EyzlZxx3g 5