SlideShare a Scribd company logo
2
Most read
MODULE IN ITE229 - OPERATING SYSTEMS 12
                                Prepared by: For-Ian V. Sandoval



                               LESSON 6
                        PROCESSOR MANAGEMENT


          The heart of managing the processor comes down to two related
issues:

   •      Ensuring that each process and application receives enough of the
          processor's time to function properly
   •      Using as many processor cycles as possible for real work

     The basic unit of software that the operating system deals with in
scheduling the work done by the processor is either a process or a thread,
depending on the operating system.

       It's tempting to think of a process as an application, but that gives
an incomplete picture of how processes relate to the operating system
and hardware. The application you see (word processor, spreadsheet or
game) is, indeed, a process, but that application may cause several other
processes to begin, for tasks like communications with other devices or
other computers. There are also numerous processes that run without
giving you direct evidence that they ever exist. For example, Windows XP
and UNIX can have dozens of background processes running to handle
the network, memory management, disk management, virus checks and
so on.

      A process, then, is software that performs some action and can be
controlled -- by a user, by other applications or by the operating system.

      It is processes, rather than applications, that the operating system
controls and schedules for execution by the CPU. In a single-tasking
system, the schedule is straightforward. The operating system allows the
application to begin running, suspending the execution only long enough
to deal with interrupts and user input.

        Interrupts are special signals sent by hardware or software to the
CPU. It's as if some part of the computer suddenly raised its hand to ask for
the CPU's attention in a lively meeting. Sometimes the operating system
will schedule the priority of processes so that interrupts are masked -- that
is, the operating system will ignore the interrupts from some sources so that
a particular job can be finished as quickly as possible. There are some
interrupts (such as those from error conditions or problems with memory)
MODULE IN ITE229 - OPERATING SYSTEMS 13
                              Prepared by: For-Ian V. Sandoval

that are so important that they can't be ignored. These non-maskable
interrupts (NMIs) must be dealt with immediately, regardless of the other
tasks at hand.

       While interrupts add some complication to the execution of
processes in a single-tasking system, the job of the operating system
becomes much more complicated in a multi-tasking system. Now, the
operating system must arrange the execution of applications so that you
believe that there are several things happening at once. This is
complicated because the CPU can only do one thing at a time. Today's
multi-core processors and multi-processor machines can handle more
work, but each processor core is still capable of managing one task at a
time.

     In order to give the appearance of lots of things happening at the
same time, the operating system has to switch between different
processes thousands of times a second. Here's how it happens:

   •   A process occupies a certain amount of RAM. It also makes use of
       registers, stacks and queues within the CPU and operating-system
       memory space.
   •   When two processes are multi-tasking, the operating system allots a
       certain number of CPU execution cycles to one program.
   •   After that number of cycles, the operating system makes copies of
       all the registers, stacks and queues used by the processes, and
       notes the point at which the process paused in its execution.
   •   It then loads all the registers, stacks and queues used by the second
       process and allows it a certain number of CPU cycles.
   •   When those are complete, it makes copies of all the registers, stacks
       and queues used by the second program, and loads the first
       program

More Related Content

What's hot (20)

PPTX
RTOS- Real Time Operating Systems
Bayar shahab
 
PPTX
Class 1: Introduction - What is an Operating System?
David Evans
 
PPTX
Real time operating systems (rtos) concepts 9
Abu Bakr Ramadan
 
PPT
Real Time Operating System
Himanshu Choudhary
 
PPTX
How Operating System Works
guevarra_2000
 
PDF
Unit 1 introduction to operating system
Bhushan Pawar -Java Trainer
 
PPTX
Types of operating system unit 1 by Ram K Paliwal
Ram Paliwal
 
PDF
Unit 4 Real Time Operating System
Dr. Pankaj Zope
 
PPTX
Introduction to Operating System
Imtiaz Ahmed
 
PDF
REAL TIME OPERATING SYSTEM PART 1
Embeddedcraft Craft
 
PPT
Introduction to Operating system
Bilal Bhatti
 
PPSX
Real Time Operating System
vivek223
 
PPTX
Types Of Operating Systems
عطاءالمنعم اثیل شیخ
 
PPTX
Real Time Operating Systems
Murtadha Alsabbagh
 
DOCX
operating system question bank
rajatdeep kaur
 
PPTX
Multiprogramming&timesharing
Tanuj Tyagi
 
PPT
Process management in os
Sumant Diwakar
 
PPTX
Operating system and its function
Nikhi Jain
 
PPTX
REAL TIME OPERATING SYSTEM
prakrutijsh
 
RTOS- Real Time Operating Systems
Bayar shahab
 
Class 1: Introduction - What is an Operating System?
David Evans
 
Real time operating systems (rtos) concepts 9
Abu Bakr Ramadan
 
Real Time Operating System
Himanshu Choudhary
 
How Operating System Works
guevarra_2000
 
Unit 1 introduction to operating system
Bhushan Pawar -Java Trainer
 
Types of operating system unit 1 by Ram K Paliwal
Ram Paliwal
 
Unit 4 Real Time Operating System
Dr. Pankaj Zope
 
Introduction to Operating System
Imtiaz Ahmed
 
REAL TIME OPERATING SYSTEM PART 1
Embeddedcraft Craft
 
Introduction to Operating system
Bilal Bhatti
 
Real Time Operating System
vivek223
 
Types Of Operating Systems
عطاءالمنعم اثیل شیخ
 
Real Time Operating Systems
Murtadha Alsabbagh
 
operating system question bank
rajatdeep kaur
 
Multiprogramming&timesharing
Tanuj Tyagi
 
Process management in os
Sumant Diwakar
 
Operating system and its function
Nikhi Jain
 
REAL TIME OPERATING SYSTEM
prakrutijsh
 

Viewers also liked (6)

PPT
Management process
Mugadha Bane
 
PPTX
Operating system - Process and its concepts
Karan Thakkar
 
PDF
Process management
Mohd Arif
 
PPT
Process management in os
Miong Lazaro
 
PPTX
Operating Systems - Processor Management
Damian T. Gordon
 
Management process
Mugadha Bane
 
Operating system - Process and its concepts
Karan Thakkar
 
Process management
Mohd Arif
 
Process management in os
Miong Lazaro
 
Operating Systems - Processor Management
Damian T. Gordon
 
Ad

Similar to Lesson 6 Processor Management (20)

PPTX
operatinndnd jdj jjrg-system-1(1) (1).pptx
krishnajoshi70
 
PPTX
OPERATING SYSTEMS OVERVIEW111111111.pptx
sivaprakash170091
 
PDF
process.pdfzljwiyrouyaeutoaetodtusiokklhh
abhinandpk2405
 
PPT
Lecture5
Ali Shah
 
PDF
Bedtime Stories on Operating Systems.pdf
AyushBaiswar1
 
PDF
Operating Systems PPT 1 (1).pdf
FahanaAbdulVahab
 
PDF
operating systems hybrid notes for computerscience.pdf
rayanrajab1
 
PDF
Operating System-Concepts of Process
Shipra Swati
 
PDF
Engg-0505-IT-Operating-Systems-2nd-year.pdf
nikhil287188
 
PPT
Module 1 Introduction.ppt
shreesha16
 
PDF
OS Content.pdf
VAIBHAVSAHU55
 
PPTX
TOPIC 3.for computer and ict studentspptx
VictorKiprotich4
 
PDF
Operating system
Prof. Dr. K. Adisesha
 
PDF
OS ppt.pdf
PavanKumarPNVS
 
PPTX
Operating System Periodic Test 1 Answers
KashikSredharan
 
PPTX
Operating System Periodic test answers t
KashikSredharan
 
PPTX
Operating System Periodic Test 1 Answers.pptx
KashikSredharan
 
PPTX
Operating Systems
Ziyauddin Shaik
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
krishnajoshi70
 
OPERATING SYSTEMS OVERVIEW111111111.pptx
sivaprakash170091
 
process.pdfzljwiyrouyaeutoaetodtusiokklhh
abhinandpk2405
 
Lecture5
Ali Shah
 
Bedtime Stories on Operating Systems.pdf
AyushBaiswar1
 
Operating Systems PPT 1 (1).pdf
FahanaAbdulVahab
 
operating systems hybrid notes for computerscience.pdf
rayanrajab1
 
Operating System-Concepts of Process
Shipra Swati
 
Engg-0505-IT-Operating-Systems-2nd-year.pdf
nikhil287188
 
Module 1 Introduction.ppt
shreesha16
 
OS Content.pdf
VAIBHAVSAHU55
 
TOPIC 3.for computer and ict studentspptx
VictorKiprotich4
 
Operating system
Prof. Dr. K. Adisesha
 
OS ppt.pdf
PavanKumarPNVS
 
Operating System Periodic Test 1 Answers
KashikSredharan
 
Operating System Periodic test answers t
KashikSredharan
 
Operating System Periodic Test 1 Answers.pptx
KashikSredharan
 
Operating Systems
Ziyauddin Shaik
 
Ad

More from Laguna State Polytechnic University (20)

PDF
Number Theory - Lesson 1 - Introduction to Number Theory
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
PDF
Machine Learning Algorithms (Part 1)
Laguna State Polytechnic University
 
PDF
Artificial Intelligence Algorithms
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 7 - Rules of Inference
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 6 - Switching Circuits
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 5 - Logical Equivalence
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 3 - Truth Tables
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 2 - Logical Connectives
Laguna State Polytechnic University
 
PDF
Formal Logic - Lesson 1 - Introduction to Logic
Laguna State Polytechnic University
 
PPTX
Ethical Issues and Relevant Laws on Computing
Laguna State Polytechnic University
 
PPTX
Number Systems Basic Concepts
Laguna State Polytechnic University
 
PDF
Number Systems Basic Concepts
Laguna State Polytechnic University
 
PPTX
Exploring the Difference Between Information Technology and Information System
Laguna State Polytechnic University
 
PPTX
Introduction to Data Science
Laguna State Polytechnic University
 
PPTX
Introduction to Computers
Laguna State Polytechnic University
 
PPTX
Introduction to Computing Logic Formulation
Laguna State Polytechnic University
 
PDF
Oasis of Sparkling and Refreshing Truisms
Laguna State Polytechnic University
 
PDF
My Teacher Got IT v2.0 - Software Installation Track
Laguna State Polytechnic University
 
Number Theory - Lesson 1 - Introduction to Number Theory
Laguna State Polytechnic University
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
Machine Learning Algorithms (Part 1)
Laguna State Polytechnic University
 
Artificial Intelligence Algorithms
Laguna State Polytechnic University
 
Formal Logic - Lesson 7 - Rules of Inference
Laguna State Polytechnic University
 
Formal Logic - Lesson 6 - Switching Circuits
Laguna State Polytechnic University
 
Formal Logic - Lesson 5 - Logical Equivalence
Laguna State Polytechnic University
 
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Laguna State Polytechnic University
 
Formal Logic - Lesson 3 - Truth Tables
Laguna State Polytechnic University
 
Formal Logic - Lesson 2 - Logical Connectives
Laguna State Polytechnic University
 
Formal Logic - Lesson 1 - Introduction to Logic
Laguna State Polytechnic University
 
Ethical Issues and Relevant Laws on Computing
Laguna State Polytechnic University
 
Number Systems Basic Concepts
Laguna State Polytechnic University
 
Number Systems Basic Concepts
Laguna State Polytechnic University
 
Exploring the Difference Between Information Technology and Information System
Laguna State Polytechnic University
 
Introduction to Data Science
Laguna State Polytechnic University
 
Introduction to Computers
Laguna State Polytechnic University
 
Introduction to Computing Logic Formulation
Laguna State Polytechnic University
 
Oasis of Sparkling and Refreshing Truisms
Laguna State Polytechnic University
 
My Teacher Got IT v2.0 - Software Installation Track
Laguna State Polytechnic University
 

Recently uploaded (20)

PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
PDF
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 

Lesson 6 Processor Management

  • 1. MODULE IN ITE229 - OPERATING SYSTEMS 12 Prepared by: For-Ian V. Sandoval LESSON 6 PROCESSOR MANAGEMENT The heart of managing the processor comes down to two related issues: • Ensuring that each process and application receives enough of the processor's time to function properly • Using as many processor cycles as possible for real work The basic unit of software that the operating system deals with in scheduling the work done by the processor is either a process or a thread, depending on the operating system. It's tempting to think of a process as an application, but that gives an incomplete picture of how processes relate to the operating system and hardware. The application you see (word processor, spreadsheet or game) is, indeed, a process, but that application may cause several other processes to begin, for tasks like communications with other devices or other computers. There are also numerous processes that run without giving you direct evidence that they ever exist. For example, Windows XP and UNIX can have dozens of background processes running to handle the network, memory management, disk management, virus checks and so on. A process, then, is software that performs some action and can be controlled -- by a user, by other applications or by the operating system. It is processes, rather than applications, that the operating system controls and schedules for execution by the CPU. In a single-tasking system, the schedule is straightforward. The operating system allows the application to begin running, suspending the execution only long enough to deal with interrupts and user input. Interrupts are special signals sent by hardware or software to the CPU. It's as if some part of the computer suddenly raised its hand to ask for the CPU's attention in a lively meeting. Sometimes the operating system will schedule the priority of processes so that interrupts are masked -- that is, the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible. There are some interrupts (such as those from error conditions or problems with memory)
  • 2. MODULE IN ITE229 - OPERATING SYSTEMS 13 Prepared by: For-Ian V. Sandoval that are so important that they can't be ignored. These non-maskable interrupts (NMIs) must be dealt with immediately, regardless of the other tasks at hand. While interrupts add some complication to the execution of processes in a single-tasking system, the job of the operating system becomes much more complicated in a multi-tasking system. Now, the operating system must arrange the execution of applications so that you believe that there are several things happening at once. This is complicated because the CPU can only do one thing at a time. Today's multi-core processors and multi-processor machines can handle more work, but each processor core is still capable of managing one task at a time. In order to give the appearance of lots of things happening at the same time, the operating system has to switch between different processes thousands of times a second. Here's how it happens: • A process occupies a certain amount of RAM. It also makes use of registers, stacks and queues within the CPU and operating-system memory space. • When two processes are multi-tasking, the operating system allots a certain number of CPU execution cycles to one program. • After that number of cycles, the operating system makes copies of all the registers, stacks and queues used by the processes, and notes the point at which the process paused in its execution. • It then loads all the registers, stacks and queues used by the second process and allows it a certain number of CPU cycles. • When those are complete, it makes copies of all the registers, stacks and queues used by the second program, and loads the first program