# data[].attributes.body
process control block: data structure - contains the information about a process?

# data[].attributes.headline
List down the states for a 5-state process diagram

# data[].attributes.subject
List down the states for a 5-state process diagram

# data[].attributes.body
new, ready, running, exit, blocked

# data[].attributes.headline
Explain the states-new, ready, running, blocked, exit

# data[].attributes.subject
Explain the states-new, ready, running, blocked, exit

# data[].attributes.body
1. new: newly created PCB but has not been admitted to executable processes pool?

2. ready: waiting for instruction to be assigned to CPU

3. running: process is currently being executed by CPU

4. blocked: process is waiting for an event to occur in order to complete the process

5. exit: releases all resources from the process

# data[].attributes.body
New - The process has been created and initialized.

Ready - The process is waiting for execution by the CPU

Running - The process is currently running by the CPU

Blocked - The process is currently unable to continue because it is waiting for an event, such as an I/O input.

Exit - The process has completed the instruction and is being closed

# data[].attributes.body
1. New - process that has been created

2. Ready - process ready to be executed

3. Running - process being executed

4. blocked - process cannot execute until an event occurs

5. exit - process has been release

# data[].attributes.body
new: a new process is created and system resources are being allocated to it

ready: the process is waiting for its turn for CPU usage

running: the process is currently being executed by the CPU

blocked: the process is awaiting an event and thus on hold until the event is completed

exit: the process is terminated

# data[].attributes.body
New - A new process and the PCB for it are created, but has not loaded into memory yet

Ready - The process and its resources are loaded into memory, ready to be processed, waiting for its turn to be executed by the CPU

Running - A process is being executed by the CPU

Blocked - Process is paused to wait for an event to occur

Exit - The execution of the process is terminated or stopped, all resources are released

# data[].attributes.body
new - creates a new process

ready - waiting for instructions of the process

running - the process is being executed

blocked - the process is waiting for input

exit - finish execution of process and close

# data[].attributes.headline
Explain the transition from 1. Ready -> Running, 2. Running->Blocked, 3. Blocked -->Ready

# data[].attributes.subject
Explain the transition from 1. Ready -> Running, 2. Running->Blocked, 3. Blocked -->Ready

# data[].attributes.body
ready->running: process is dispatched from ready state to runnning state as it has been chosen by the OS to be executed

running-> blocked: process is paused as it is requesting or waiting for a resource from the OS in order to complete the task

blocked->ready: a process is moved back to the ready state after the event waiting has been occured?

# data[].attributes.body
1) Ready to running occurs when the OS selects a process in the ready state and transfers it to the CPU for execution.

2) A running process has to wait for an event to occur like an I/O input, and therefore moves to a blocked state.

3) A blocked process that has completed an event it was waiting for and is now ready to be executed by the CPU.

# data[].attributes.body
Ready -> Running

- when a one of the process is chosen to run by the OS

Running -> Blocked

- when a process is put on Blocked state if it request something, so it must wait

Blocked -> Ready

- when a process that is waiting for an event occurs, it is moved to the Ready state

# data[].attributes.body
1. Ready - Running: When the processor becomes available, a process will be chosen to be executed based on OS' scheduling algorithm.

2. Running - Blocked: An event occurs and process can not continue running until said event is completed.

3. Blocked - Ready: The event is completed and process is ready to resume executing when the processor becomes available again.

# data[].attributes.body
1. The process is being dispatched to the CPU to be executed

2. After the event is being executed, it will stop and wait for the other events to be completed

3. Once an event is being prompted, the process will proceed to ready state and it is ready to be executed by CPU

# data[].attributes.body
1. a process will be chosen by the cpu and execute the process

2. while running the process, an event will be needed for the process to continue thus it will be swapped out into blocked state

3. once the event occurs, the process can now continue being executed by cpu

# data[].attributes.body
Ready --> Running - Dispatch, the process that was initially waiting for its turn to be executed is fetch by the CPU and starts to be executed

Running --> Blocked - Event Wait, the executing process is paused for a while to wait for an event to occur

Blocked --> Ready - Event occurs, the process that waits for an event to occur is back to the ready state to be ready to resume its execution after the event occurred

# data[].attributes.headline
What is 1. blocked/suspend state 2. ready/suspend state?

# data[].attributes.subject
What is 1. blocked/suspend state 2. ready/suspend state?

# data[].attributes.body
blocked/suspend: the process is put on hold in the ssd / hard disk (?) while waiting for an event to occur

# data[].attributes.body
Blocked/Suspend: The process is stored in secondary storage, but not in the RAM, while waiting for an event to occur

# data[].attributes.body
Blocked/suspend - The process is in the secondary memory and awaiting an event.

# data[].attributes.body
suspend/blocked state refers to a suspended event, which means it is scheduled to happen at a later time. it belongs in secondary storage while it is not active

# data[].attributes.body
suspend/blocked - when a process waiting for an event is moved to the memory

# data[].attributes.body
ready/suspend: process is waiting to be executed by the CPU but in the ssd

# data[].attributes.body
The process is ready and waiting for its turn to be executed by the CPU, but it's waiting in secondary storage

# data[].attributes.body
Ready/suspend - The program is waiting to be executed by the CPU and exists in the secondary memory.

# data[].attributes.body
waiting for execution by the CPU at the secondary storage

# data[].attributes.body
user mode: enters inputs to be processed. visible programs are executed in this mode. lower priority.

kernel mode: takes all the inputs to be processed into an output. higher priority.

# data[].attributes.body
User mode: The non- privileged mode that has limited access to software and hardware resources.

Kernel mode: The privileged mode that only OS have access to. This mode has full control of the entire system resources.

# data[].attributes.body
User mode - A mode to run less privileged instructions like instructions from user program, only part of the resources is available

Kernel mode - A mode to run privileged instructions related to the system, OS kernel/core has full access to the resources

# data[].attributes.body
user mode - less priviledges and users common use mode

kernel mode - higher priviledges and more functions

# data[].attributes.body
Kernel mode: a process in kernel mode has access to all system resources and hardware

User mode: the mode that users interact with the process on. it has limited privileges so users can't access everything

# data[].attributes.body
user mode: Applications run in this mode, with limited privileges, and cannot directly accesshardware or critical system resources. kernel mode: The operating system kernel runs in this mode, with complete andunrestricted control over all hardware and memory.

# data[].attributes.body
user mode:user program typically execute in this mode and restricted execution for safety. kernel mode:unrestricted, full control of hardware.

# data[].attributes.headline
What is context switching? Provide an example/scenario of context switching

# data[].attributes.subject
What is context switching? Provide an example/scenario of context switching

# data[].attributes.body
Context switching is the process of preempting a process that is being executed by the CPU and executes another process

Scenario: When a process execution reaches its execution time limit and has to wait for another turn for execution, while another process takes its turn to be executed by the CPU

# data[].attributes.body
context switching is when the context of a process is saved into its PCB after being executed and then swapped out with another process. the context of that process is then loaded onto the processor.

this will occur when a process moves from running state back to ready state and vice versa. 🤔😭

# data[].attributes.body
Context switching - The CPU stops a process and saves it's current state, then loads another process. For example, running two programs at the same time.

# data[].attributes.body
context switching: switching from one running process into a ready state process. it saves the process then updates the PCB everytime there is a different process in the running state. then it restores the previous process and resumes to run it.

# data[].attributes.body
Context switching: A process stops running and another process start running. This entire process allows multitasking.

# data[].attributes.body
context switching is when a process is stopped and saved to allow another process to be swapped in to its place to be executed

example, when an allocated time slot reaches its limit and the OS slots in another process

# data[].attributes.body
process of rapidly shifting focus between multiple tasks. E.g when ur on word processor and then u open your email the os performs context switching

# data[].attributes.body
It is a process which switching process or thread from the CPU to another process. The state of the process is stored and can be restored later for execution. It is done by moving the process into the Process Control Block.