
- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
What is the relationship between process states and the machine cycle?
Let us understand what a process state is.
Process States
Process states are the states in which the process is currently residing. There are basically five states of processes −
New − The process is about to be created in this state but not yet created. It is the program which is present in secondary memory that will be picked up by OS to create the process.
Ready − The process enters the ready state after the creation of a process that means the process is loaded into the main memory.
Running − The process is chosen by the CPU for instructions and the executions within the process and they are executed by any one of the available CPU cores.
Waiting − Whenever the process requests access to I/O or needs input from the user or needs access to a critical region it enters the blocked or wait state.
Terminated − Process is killed as well as PCB (Process Control Box) is deleted.
The process states are depicted in the diagram given below −
Machine Cycle
A machine cycle is the basic operation performed by a central processing unit (CPU) which is the main logic unit of a computer.
It consists of a sequence of three steps which is performed continuously and at a rate of millions per second while a computer is in operation.
Just like a process is in different states, in a machine cycle there are fetch, decode and execute operations.
Fetch − The control unit that requests instructions from main memory which is stored at a memory’s location as indicated by the program counter.
Decode − Received instructions are decoded in the instruction register.
Execute − It involves the instruction’s opcode as it specifies the CPU operation required. The program counter contains the address of the next instruction to be executed. These instructions are arranged into the instructions register and as each is executed, it increments the program counter so that the next instruction is stored in memory.
Store − It used to store the result and stores the next instruction that has to be executed.
The machine cycle is depicted in the diagram given below −
- Related Articles
- What are the process states in Windows and Linux?
- What are process states?
- What is the Relationship Between the IoT and Arduino?
- What is the relationship between correlation and covariance?
- What is the relationship between Cookies and Cybersecurity?
- What is the relationship between Km and m?
- What is the relationship between force and pressure?
- What is the relationship between force and acceleration ?
- What are the different types of process states and queues?
- What is the Relationship Between Data Privacy And Cybersecurity
- What are the five process states in the Linux kernel ?
- What are the different states of a Process?\n
- What is the relationship between CAPM and the Cost of Equity?
- What is the relationship between G and g in physics?
- Thread life cycle and its states in Ruby
