Complete the sentence to describe a process.
A process is an instance of a program in execution that has its own [1] and resources.
A process has its own separate memory space and resources to run independently.
Complete the sentence to describe a thread.
A thread is the smallest unit of execution within a [1] and shares its memory.
A thread runs inside a process and shares the process's memory and resources.
Fix the error in the statement about processes and threads.
Processes [1] memory space, while threads [2] memory space.
Processes have separate memory spaces, while threads share the memory space of their process.
Fill both blanks to complete the comparison between processes and threads.
Processes are [1] to create and manage, while threads are [2] to create and manage.
Processes are heavier and slower to create and manage because they have separate memory and resources. Threads are lighter and faster because they share resources within a process.
Fill all three blanks to complete the dictionary comprehension about processes and threads.
info = [1]: [2] for [3] in ['process', 'thread']
This comprehension creates a dictionary where keys are items ('process' or 'thread') and values are the length of each item.