SlideShare a Scribd company logo
1 of 30
CSC204
Chapter 3: OS– SystemView
3.0 OS - SystemView
3.1 Process Management
3.1.1 Process Concepts
3.1.2 SingleTasking
3.1.3 Multitasking
3.2 Memory Management
3.2.1 Memory Hierarchy
3.2.2 Physical Memory
3.2.3 Virtual Memory
3.0 OS - UserView
3.3 I/O Management
3.3.1 I/O System Organization
3.3.2 I/O CommunicationTechniques
3.3.3 Direct Memory Access
3.3.4 Buffering
3.4 OS Internal Protection and Security
3.4.1 User Authentication
3.4.2 Basic Resource Protection
3.1.1 Process Concepts
3.1.2 SingleTasking
3.1.3 Multitasking
3.1.1 Process Concepts
What is a program ??
 Inactive@passive entity, such as a file stored on a
disk.
 To an operating system, a program/job/ task is a
unit of work that has been submitted by user.
 “Job” is usually associated with batch systems.
 “Task” is usually associated with multitasking
systems.
What is a process ??
 A process is a program in execution.
 Active entity, which requires a set of resources, including
a processor and special registers to perform its function.
3.1.1 Process Concepts
 A process includes :-
Stack (contain temporary data)
Data section (contain global variables)
Heap (memory that is automatically
allocated during process runtime)
 2 types of process :-
O/S process = executes system codes
User process = executes user codes.
3.1.1 Process Concepts
 Each process is represented in the OS by a
process control block (PCB) or task control
block.
 Each PCB is unique, there are no two PCB’s
alike
3.1.1 Process Concepts
Process Control Block (PCB)
Identify the current state new, ready,
running, waiting, terminated
Accounting information includes the
amount of CPU and real time used,
time limits, process numbers and
etc.
Accumulators, index, stack pointers,
state info when interrupt occurs.
I/O status information list of I/O
devices allocate for this process. List
of open files.
CPU scheduling information includes
a process priority, pointers to
scheduling queues or other
scheduling parameters
Counter indicated the address of
next instructions to be executed by
this process
Memory management information,
value of base & limit registers, page
tables, segment tables used by O/S
3.1.1 Process Concepts
Process State
 As a process executes, it changes state.
 The state of a process is defined in part by the
current activity of that process.
 Only one process can be running on any
processor at any instant.
 However, many processes may be ready and
waiting for their turn to be processed.
3.1.1 Process Concepts
 Process State includes:
New : The process is being
created.
Running : Instructions are being
executed.
Waiting : The process is waiting for
some event to occur (such as an I/O
completing or reception of a signal)
Ready : The process is waiting to
be assigned to a processor
Terminated : The process has finished
execution
3.1.1 Process Concepts
Hold(New)
Ready Running
Waiting
I/O or event
completion
Scheduler dispatch
I/O or event
wait
Admitted
Interrupt Exit
Finished
Handled by Process Scheduler
Handled by Job Scheduler
Job pool
Diagram of Process State
3.1.1 Process Concepts
 In a processing cycle, a process might have
to wait for computer resources, as it waits,
the process will be placed in a queue
Job queue - set of all processes in the
system, that are waiting to be moved
into memory.
Ready queue - set of all processes
residing in main memory, ready and
waiting to be executed by CPU.
Device @ I/O queue - set of processes
waiting for an I/O device
3.1.1 Process Concepts
3.1.1 Process Concepts
 O/S control the selection of the process
from one queue to another.
 The selection of the process is carried out
by a scheduler
1. LongTerm Scheduler (Job Scheduler)
2. Short Term Scheduler (Process @ CPU
Scheduler)
3. MediumTerm Scheduler
3.1.1 Process Concepts
LongTerm Scheduler
 Also known as Job Scheduler.
 Selects processes from the job queue and loads
them into memory for execution.
 Long-term scheduler is invoked very
infrequently and slow.
 The long-term scheduler controls the degree of
multiprogramming and a good combination of
I/O bound and CPU bound processes.
3.1.1 Process Concepts
ShortTerm Scheduler
 Also known as Process or CPU Scheduler.
 Select from among the processes that are
ready to execute and allocates the CPU to one
of them.
 Short-term scheduler is invoked very
frequently and very fast.
3.1.1 Process Concepts
MediumTerm Scheduler
 The process will be swapped out from memory
and swapped back in later for continuation.
 This swapping scheme is to reduce the degree
of multiprogramming and balance the process
mixture.
3.1.1 Process Concepts
Context Switch
 Happens when switching the CPU to another
process.
 Saving the state of the old process and loading
the saved state for new process.
3.1.1 Process Concepts
 Process Manager performs job scheduling,
process scheduling and interrupt
management.
 In single-tasking, processor is busy only when
user is executing a job—at all other times it is
idle.
Processor management is simple.
 In multiprogramming environment, processor
must be allocated to each job in a fair and
efficient manner.
Requires scheduling policy and a scheduling
algorithm. Eg. FCFS, SJF, SRTF, RR etc.
3.1.2 SingleTasking
 Only one program executed at a time
 Begins running a new program on a
computer system as soon as the current
program is completed.
 Example: Palm OS for Palm handheld
computers
 Single tasking is divided by 2 types of
processing:
1) Sequential Processing
2) Batch Processing
Memory layout of
early computer
systems
3.1.2 SingleTasking
Sequential Processing
 New programs or commands cannot be
started until the preceding program or
command has completed.
 Example: when you enter commands line
by line.
 Will complete executing each command
before going on to the next
3.1.2 SingleTasking
Batch Processing
 Jobs or several user programs are grouped into
a batch and processed one after another in a
continuous stream.
 Not interactive so user cannot interact with
program while the program is running.
 Example: The customer does not receive a bill
for each separate credit card purchase but one
monthly bill for all of that month's purchases.
3.1.2 SingleTasking
Batch Processing
3.1.3 Multi-tasking
 Multi-tasking OS provides the ability to run more
than one program at once.
 Multi-tasking is divided by 2 types of
processing:
1) Multiprogramming
2) Time Sharing Systems
3.1.3 Multi-tasking
3.1.3 Multi-tasking
Multiprogramming
 Batched and non-interactive
 Multiprogramming increases CPU utilization by
organizing jobs so that the CPU always has one
to execute
The operating system keeps several jobs in
memory simultaneously
It picks and begins to execute one of the jobs
in memory
3.1.3 Multi-tasking
Multiprogramming
 Eventually, the job may have to wait for some
task to complete
 In a multiprogrammed system, the OS switches
to another job and executes it
 The first job finishes waiting and gets the CPU
back
 As long as at least one job needs to execute –
the CPU is never idle
3.1.3 Multi-tasking
Multiprogramming
Memory Layout for Multiprogrammed System
3.1.3 Multi-tasking
Time Sharing Systems
 Time sharing is a logical extension of
multiprogramming
 In time sharing systems, the CPU executes
multiple jobs by switching among them, but the
switches occur so frequently that the users can
interact with each program while it is running
 It requires an interactive computer system
providing direct communication between user
and the system
3.1.3 Multi-tasking
Time Sharing Systems

More Related Content

Similar to CSC204 - Chapter 3.1.pptx

Types of Operating System-converted.pdf
Types of Operating System-converted.pdfTypes of Operating System-converted.pdf
Types of Operating System-converted.pdf
Omid695066
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
Luka M G
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
Gaurav Meena
 

Similar to CSC204 - Chapter 3.1.pptx (20)

Types of Operating System-converted.pdf
Types of Operating System-converted.pdfTypes of Operating System-converted.pdf
Types of Operating System-converted.pdf
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
Operating System.pptx
Operating System.pptxOperating System.pptx
Operating System.pptx
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 
Operating system
Operating systemOperating system
Operating system
 
Fundamental Operating System Concepts.pptx
Fundamental Operating System Concepts.pptxFundamental Operating System Concepts.pptx
Fundamental Operating System Concepts.pptx
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Ch1
Ch1Ch1
Ch1
 
Process Management
Process ManagementProcess Management
Process Management
 
52bf066dbfcc4d739fa99d255dba287a.pptx
52bf066dbfcc4d739fa99d255dba287a.pptx52bf066dbfcc4d739fa99d255dba287a.pptx
52bf066dbfcc4d739fa99d255dba287a.pptx
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
 
seminar report
seminar reportseminar report
seminar report
 
Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Operating system Concepts
Operating system Concepts Operating system Concepts
Operating system Concepts
 
Operating system
Operating systemOperating system
Operating system
 
Operating System Simple Introduction
Operating System Simple IntroductionOperating System Simple Introduction
Operating System Simple Introduction
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 

CSC204 - Chapter 3.1.pptx

  • 2. 3.0 OS - SystemView 3.1 Process Management 3.1.1 Process Concepts 3.1.2 SingleTasking 3.1.3 Multitasking 3.2 Memory Management 3.2.1 Memory Hierarchy 3.2.2 Physical Memory 3.2.3 Virtual Memory
  • 3. 3.0 OS - UserView 3.3 I/O Management 3.3.1 I/O System Organization 3.3.2 I/O CommunicationTechniques 3.3.3 Direct Memory Access 3.3.4 Buffering 3.4 OS Internal Protection and Security 3.4.1 User Authentication 3.4.2 Basic Resource Protection
  • 4. 3.1.1 Process Concepts 3.1.2 SingleTasking 3.1.3 Multitasking
  • 5. 3.1.1 Process Concepts What is a program ??  Inactive@passive entity, such as a file stored on a disk.  To an operating system, a program/job/ task is a unit of work that has been submitted by user.  “Job” is usually associated with batch systems.  “Task” is usually associated with multitasking systems. What is a process ??  A process is a program in execution.  Active entity, which requires a set of resources, including a processor and special registers to perform its function.
  • 6. 3.1.1 Process Concepts  A process includes :- Stack (contain temporary data) Data section (contain global variables) Heap (memory that is automatically allocated during process runtime)  2 types of process :- O/S process = executes system codes User process = executes user codes.
  • 7. 3.1.1 Process Concepts  Each process is represented in the OS by a process control block (PCB) or task control block.  Each PCB is unique, there are no two PCB’s alike
  • 8. 3.1.1 Process Concepts Process Control Block (PCB) Identify the current state new, ready, running, waiting, terminated Accounting information includes the amount of CPU and real time used, time limits, process numbers and etc. Accumulators, index, stack pointers, state info when interrupt occurs. I/O status information list of I/O devices allocate for this process. List of open files. CPU scheduling information includes a process priority, pointers to scheduling queues or other scheduling parameters Counter indicated the address of next instructions to be executed by this process Memory management information, value of base & limit registers, page tables, segment tables used by O/S
  • 9. 3.1.1 Process Concepts Process State  As a process executes, it changes state.  The state of a process is defined in part by the current activity of that process.  Only one process can be running on any processor at any instant.  However, many processes may be ready and waiting for their turn to be processed.
  • 10. 3.1.1 Process Concepts  Process State includes: New : The process is being created. Running : Instructions are being executed. Waiting : The process is waiting for some event to occur (such as an I/O completing or reception of a signal) Ready : The process is waiting to be assigned to a processor Terminated : The process has finished execution
  • 11. 3.1.1 Process Concepts Hold(New) Ready Running Waiting I/O or event completion Scheduler dispatch I/O or event wait Admitted Interrupt Exit Finished Handled by Process Scheduler Handled by Job Scheduler Job pool Diagram of Process State
  • 12. 3.1.1 Process Concepts  In a processing cycle, a process might have to wait for computer resources, as it waits, the process will be placed in a queue Job queue - set of all processes in the system, that are waiting to be moved into memory. Ready queue - set of all processes residing in main memory, ready and waiting to be executed by CPU. Device @ I/O queue - set of processes waiting for an I/O device
  • 14. 3.1.1 Process Concepts  O/S control the selection of the process from one queue to another.  The selection of the process is carried out by a scheduler 1. LongTerm Scheduler (Job Scheduler) 2. Short Term Scheduler (Process @ CPU Scheduler) 3. MediumTerm Scheduler
  • 15. 3.1.1 Process Concepts LongTerm Scheduler  Also known as Job Scheduler.  Selects processes from the job queue and loads them into memory for execution.  Long-term scheduler is invoked very infrequently and slow.  The long-term scheduler controls the degree of multiprogramming and a good combination of I/O bound and CPU bound processes.
  • 16. 3.1.1 Process Concepts ShortTerm Scheduler  Also known as Process or CPU Scheduler.  Select from among the processes that are ready to execute and allocates the CPU to one of them.  Short-term scheduler is invoked very frequently and very fast.
  • 17. 3.1.1 Process Concepts MediumTerm Scheduler  The process will be swapped out from memory and swapped back in later for continuation.  This swapping scheme is to reduce the degree of multiprogramming and balance the process mixture.
  • 18. 3.1.1 Process Concepts Context Switch  Happens when switching the CPU to another process.  Saving the state of the old process and loading the saved state for new process.
  • 19. 3.1.1 Process Concepts  Process Manager performs job scheduling, process scheduling and interrupt management.  In single-tasking, processor is busy only when user is executing a job—at all other times it is idle. Processor management is simple.  In multiprogramming environment, processor must be allocated to each job in a fair and efficient manner. Requires scheduling policy and a scheduling algorithm. Eg. FCFS, SJF, SRTF, RR etc.
  • 20. 3.1.2 SingleTasking  Only one program executed at a time  Begins running a new program on a computer system as soon as the current program is completed.  Example: Palm OS for Palm handheld computers  Single tasking is divided by 2 types of processing: 1) Sequential Processing 2) Batch Processing Memory layout of early computer systems
  • 21. 3.1.2 SingleTasking Sequential Processing  New programs or commands cannot be started until the preceding program or command has completed.  Example: when you enter commands line by line.  Will complete executing each command before going on to the next
  • 22. 3.1.2 SingleTasking Batch Processing  Jobs or several user programs are grouped into a batch and processed one after another in a continuous stream.  Not interactive so user cannot interact with program while the program is running.  Example: The customer does not receive a bill for each separate credit card purchase but one monthly bill for all of that month's purchases.
  • 24. 3.1.3 Multi-tasking  Multi-tasking OS provides the ability to run more than one program at once.  Multi-tasking is divided by 2 types of processing: 1) Multiprogramming 2) Time Sharing Systems
  • 26. 3.1.3 Multi-tasking Multiprogramming  Batched and non-interactive  Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute The operating system keeps several jobs in memory simultaneously It picks and begins to execute one of the jobs in memory
  • 27. 3.1.3 Multi-tasking Multiprogramming  Eventually, the job may have to wait for some task to complete  In a multiprogrammed system, the OS switches to another job and executes it  The first job finishes waiting and gets the CPU back  As long as at least one job needs to execute – the CPU is never idle
  • 29. 3.1.3 Multi-tasking Time Sharing Systems  Time sharing is a logical extension of multiprogramming  In time sharing systems, the CPU executes multiple jobs by switching among them, but the switches occur so frequently that the users can interact with each program while it is running  It requires an interactive computer system providing direct communication between user and the system