SlideShare uma empresa Scribd logo
INE5408
Estruturas de Dados
Aula 6b
Listas Circulares
Listas Encadeadas Circulares
• Último elemento conecta ao primeiro.
• Implementação mais simples:
3
info próximo info próximo info próximo
nro dados
melão
doce
caro
maçã
azeda
cara
uva
irkh
barata
Listas Encadeadas Circulares
• Caso especial:
– Lista circular unitária.
• Atividade:
– Quais operações têm algoritmos diferentes?
– Qual é a posição mais indicada para inserir quando a posição não
importa ?
1
info próximo
nro dados
melão
doce
caro
Listas Encadeadas Circulares
• Alternativa para evitar mudança nos algoritmos
– nodo-sentinela funciona sempre como nodo sem informações
atachado à cabeça de lista
– lista é criada posuindo o nodo sentinela
– algoritmos não se modificam
4
info próximo info próximo info
nro dados
maçã
azeda
cara
uva
irkh
barata
melão
doce
caro
próximo
info próximo
Para que servem listas circulares?
• Modelagem e planejamento de rotas
circulares
– Caminho de retorno é diferente do de ida.
– Exemplo: rotas aéreas tipo volta-ao-mundo.
– Útil em sistemas de planejamento de itinerário e
de reserva global de passagens como Amadeus
Global Travel Distribution System
Para que servem listas circulares?
Para que servem listas circulares?
Para que servem listas circulares?
• Escalonamento de Processos (Process
Scheduling) em kernels de sistemas
operacionais multitarefa preemptivos.
– Exemplo: método round-robin (tradução:
sabiá-cíclico - não se preocupe: ninguém
usa) de escalonamento de processos com
fatia de tempo constante por processo.
Round Robin
CPU
Proc.#1
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#2
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#3
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#4
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Round Robin
CPU
Proc.#1
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#2
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#3
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#4
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Round Robin
CPU
Proc.#1
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#2
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#3
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Proc.#4
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
long int SomeFunction(); /*
int OtherFunction(); */ /* int
*/ CallingFunction() { long
int test1; register /* int */
test2; test1 = SomeFunction();
if (test1 > 0) test2 = 0; else
test2 = OtherFunction();
return test2; }.
Var1
Var2
Var3
Var4
Var5
Para que servem listas circulares?
• Sistemas de impressão que controlam várias
impressoras
– Realizam escalonamento de impressoras
(round-robin printing queue) por
disponibilidade para impressão de
documentos em uma fila de impressão
cíclica única para várias impressoras.
Para que servem listas circulares?

Mais conteúdo relacionado

Último

Manual-de-Credenciamento ANATER 2023.pdf
Manual-de-Credenciamento ANATER 2023.pdfManual-de-Credenciamento ANATER 2023.pdf
Manual-de-Credenciamento ANATER 2023.pdf
WELITONNOGUEIRA3
 
História da Rádio- 1936-1970 século XIX .2.pptx
História da Rádio- 1936-1970 século XIX   .2.pptxHistória da Rádio- 1936-1970 século XIX   .2.pptx
História da Rádio- 1936-1970 século XIX .2.pptx
TomasSousa7
 
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
Faga1939
 
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdfTOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
Momento da Informática
 
Certificado Jornada Python Da Hashtag.pdf
Certificado Jornada Python Da Hashtag.pdfCertificado Jornada Python Da Hashtag.pdf
Certificado Jornada Python Da Hashtag.pdf
joaovmp3
 
Segurança Digital Pessoal e Boas Práticas
Segurança Digital Pessoal e Boas PráticasSegurança Digital Pessoal e Boas Práticas
Segurança Digital Pessoal e Boas Práticas
Danilo Pinotti
 
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdfDESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
Momento da Informática
 
Logica de Progamacao - Aula (1) (1).pptx
Logica de Progamacao - Aula (1) (1).pptxLogica de Progamacao - Aula (1) (1).pptx
Logica de Progamacao - Aula (1) (1).pptx
Momento da Informática
 

Último (8)

Manual-de-Credenciamento ANATER 2023.pdf
Manual-de-Credenciamento ANATER 2023.pdfManual-de-Credenciamento ANATER 2023.pdf
Manual-de-Credenciamento ANATER 2023.pdf
 
História da Rádio- 1936-1970 século XIX .2.pptx
História da Rádio- 1936-1970 século XIX   .2.pptxHistória da Rádio- 1936-1970 século XIX   .2.pptx
História da Rádio- 1936-1970 século XIX .2.pptx
 
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
PRODUÇÃO E CONSUMO DE ENERGIA DA PRÉ-HISTÓRIA À ERA CONTEMPORÂNEA E SUA EVOLU...
 
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdfTOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
TOO - TÉCNICAS DE ORIENTAÇÃO A OBJETOS aula 1.pdf
 
Certificado Jornada Python Da Hashtag.pdf
Certificado Jornada Python Da Hashtag.pdfCertificado Jornada Python Da Hashtag.pdf
Certificado Jornada Python Da Hashtag.pdf
 
Segurança Digital Pessoal e Boas Práticas
Segurança Digital Pessoal e Boas PráticasSegurança Digital Pessoal e Boas Práticas
Segurança Digital Pessoal e Boas Práticas
 
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdfDESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
DESENVOLVIMENTO DE SOFTWARE I_aula1-2.pdf
 
Logica de Progamacao - Aula (1) (1).pptx
Logica de Progamacao - Aula (1) (1).pptxLogica de Progamacao - Aula (1) (1).pptx
Logica de Progamacao - Aula (1) (1).pptx
 

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Aula_6b_-_Listas_Circulares.ppt

  • 1. INE5408 Estruturas de Dados Aula 6b Listas Circulares
  • 2. Listas Encadeadas Circulares • Último elemento conecta ao primeiro. • Implementação mais simples: 3 info próximo info próximo info próximo nro dados melão doce caro maçã azeda cara uva irkh barata
  • 3. Listas Encadeadas Circulares • Caso especial: – Lista circular unitária. • Atividade: – Quais operações têm algoritmos diferentes? – Qual é a posição mais indicada para inserir quando a posição não importa ? 1 info próximo nro dados melão doce caro
  • 4. Listas Encadeadas Circulares • Alternativa para evitar mudança nos algoritmos – nodo-sentinela funciona sempre como nodo sem informações atachado à cabeça de lista – lista é criada posuindo o nodo sentinela – algoritmos não se modificam 4 info próximo info próximo info nro dados maçã azeda cara uva irkh barata melão doce caro próximo info próximo
  • 5. Para que servem listas circulares? • Modelagem e planejamento de rotas circulares – Caminho de retorno é diferente do de ida. – Exemplo: rotas aéreas tipo volta-ao-mundo. – Útil em sistemas de planejamento de itinerário e de reserva global de passagens como Amadeus Global Travel Distribution System
  • 6. Para que servem listas circulares?
  • 7. Para que servem listas circulares?
  • 8. Para que servem listas circulares? • Escalonamento de Processos (Process Scheduling) em kernels de sistemas operacionais multitarefa preemptivos. – Exemplo: método round-robin (tradução: sabiá-cíclico - não se preocupe: ninguém usa) de escalonamento de processos com fatia de tempo constante por processo.
  • 9. Round Robin CPU Proc.#1 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#2 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#3 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#4 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5
  • 10. Round Robin CPU Proc.#1 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#2 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#3 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#4 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5
  • 11. Round Robin CPU Proc.#1 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#2 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#3 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 Proc.#4 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5 long int SomeFunction(); /* int OtherFunction(); */ /* int */ CallingFunction() { long int test1; register /* int */ test2; test1 = SomeFunction(); if (test1 > 0) test2 = 0; else test2 = OtherFunction(); return test2; }. Var1 Var2 Var3 Var4 Var5
  • 12. Para que servem listas circulares? • Sistemas de impressão que controlam várias impressoras – Realizam escalonamento de impressoras (round-robin printing queue) por disponibilidade para impressão de documentos em uma fila de impressão cíclica única para várias impressoras.
  • 13. Para que servem listas circulares?