程序代写 COMP 3430 Operating systems

COMP 3430 Operating systems
Process lifecycle, threads intro

January 31st, 2022

Copyright By PowCoder代写 加微信 powcoder

By the end of today’s lecture, you should be able to:
▶ Describe the lifecycle of a process.
▶ Compare and contrast processes and
The Rocket Book (Public Domain)

Assignment 1
Assignment 1 is now available, let’s check it out.

“States” (Public Domain)
Let’s take a look at states in struct task_struct.
▶ Let’s draw a state transition graph (COMP 2080 & 3030).
▶ The start state is the default state – what’s the default on Linux?
▶ Now identify what the next state is, until we find an end state.

Process states
▶ This is one piece of metadata an OS keeps about a process. ▶ Helps inform:
▶ Scheduling activities.
▶ Maintenance activities.
▶ We can represent these states as a graph 𝐺 = (𝑉 , 𝐸) where:
▶ 𝑉 are the states
▶ 𝐸 are possible transitions between states

Loom (Pixabay License)
▶ Processes → coarse-grained concurrency
▶ Easier to use (fork off and forget)
▶ Everything** is copied (see: man 2
▶ Threads → fine-grained concurrency
▶ Harder to use (we have to manage threads)
▶ Cheaper to use (memory is shared) ( ?)

▶ Process life cycle is modelled by states.
▶ Threads are a more granular form of concurrency.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com