SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Dept. of Computer Science – FITA – HUA




          Van Hoang Nguyen
          Mail: startnewday85@gmail.com
          Department of Computer Science – FITA – HUA



Advanced Operating System Course ---------------------------------- Fall 2012
Advanced Operating System – Fall 2012




                   http://en.wikipedia.org/wiki/EDVAC
Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                                Registers
                                 Stack




                            R      R        R
                            S      S        S




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   batch, interactive, real-time




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                             throughput, turnaround time, CPU
                   utilization
                               response time, proportionality
                               meeting deadlines, predictability


Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   › Shortest Remaining Time Next



Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   › Shortest Process Next
                   › Guaranteed Scheduling
                   › Lottery
                   › Fair share
Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                                                                      › Barrier
                   Strict alternation    Semaphores
                   Peterson’s solution   Mutexes
                   TSL/XCHG




Van Hoang Nguyen
Advanced Operating System – Fall 2012




               memory hierarchy




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   Base and Limit Register
                   Swap
                   Virtual Memory

Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   long-term information storage




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   File A        File B       File C




                        File    File          File         File
                       block   block         block        block
                         0       1             2            3



Van Hoang Nguyen
Advanced Operating System – Fall 2012



                                     File A
                   0   1   2     3     4   5   6    7

                           6           7       -1   2




Van Hoang Nguyen
Advanced Operating System – Fall 2012




               File’s Name   Attributes   File’s Name

               File’s Name   Attributes   File’s Name

               File’s Name   Attributes   File’s Name

               File’s Name   Attributes   File’s Name



Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   Sourced by: Machine learning overview – Ho T.B
Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   (diversity of mobile devices)




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




          Lecture                    Reference

          Introduction               [3] Chapter 1 - 13

          Parallel and Distributed   [1]. Chapter 8

          Real-Time                  [1]. Chapter 7 and [2]

          WebOS

          Kernel Architecture

          Big Storage

          Protection and Security    [1]. Chapter 9




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   Regular attention   10%
                   Mid                 30%
                   Final               60%
                   Total               100%




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




  while (turn!=0) /*loop*/;   while (turn!=1) /*loop*/;
  critical_region();          critical_region();
  turn=1;                     turn=0;
  noncritical_region();       noncritical_region();




Van Hoang Nguyen
Advanced Operating System – Fall 2012




  void enter_region(int process)    void leave_region(int process)
  {                                 {
        int other;                        interested[process]=0;
        other = 1-process;          }
        interested[process]=1;
        turn=process;
        while (turn==process
        && interested[other]==1);
  }

Van Hoang Nguyen
Advanced Operating System – Fall 2012




  enter_region:             enter_region:
        TSL REGISTER,LOCK         MOVE REGISTER,#1
        CMP REGISTER,#0           XCHG REGISTER,LOCK
        JNE enter_region          CMP REGISTER,#0
        RET                       JNE enter_region
  leave_region                    RET
        MOVE LOCK,#0        leave_region
        RET                       MOVE LOCK,#0
                                  RET

Van Hoang Nguyen
Advanced Operating System – Fall 2012




  void producer(){                   void consumer(){
        int item;                          int item;
        while(true){                       while(true){
              item=produce_item();               item=produce_item();
              down(&empty);                      down(&full);
              down(&mutex);                      down(&mutex);
              insert_item(item);                 item=remove_item();
              up(&mutex);                        up(&mutex);
              up(&full);                         up(&empty);
        }                                        consume_item(item);
  }                                        }
                                     }

Van Hoang Nguyen
Advanced Operating System – Fall 2012




  mutex_lock:                mutex_unlock:
        TSL REGISTER,MUTEX         MOVE MUTEX,#0
        CMP REGISTER,#0            RET
        JZE ok
        CALL thread_yield
        JMP mutex_lock
  ok:   RET


Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   a simplest version of dynamic relocation




Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   not enough to hold all process in physical memory




             C          C            C           C               C

             B          B            B
                                                                 A
             A
                                     D           D               D
             OS         OS          OS           OS              OS

Van Hoang Nguyen
Advanced Operating System – Fall 2012




                    ==> some issues                                Stack
           › Fixed size while data segment can grow
               › allocate an extra memory                                       Room for
               › arrange stack and heap segment                                  grow

           › Big process can not run
                                                                    Data
           › Fragmentation problem
               › External Fragmentation                            Code
               › Internal Fragmentation                               OS
               › memory compact ==> waste CPU time



Van Hoang Nguyen
Advanced Operating System – Fall 2012




                     ==> some issues
           › How to manage free memory
               › bitmaps: unit size, difficult to allocate
               › free lists
           › How to allocate
               › first fit
               › next fit
               › best fit
               › worst fit
               › quick fit



Van Hoang Nguyen
Advanced Operating System – Fall 2012




                   Page

                                                     Page
                                                     frame




                          PageTable
Van Hoang Nguyen

Contenu connexe

Plus de Hoang Nguyen

Information, Data and Decision Making
Information, Data and Decision MakingInformation, Data and Decision Making
Information, Data and Decision MakingHoang Nguyen
 
Multiple processor systems
Multiple processor systemsMultiple processor systems
Multiple processor systemsHoang Nguyen
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor SystemsHoang Nguyen
 
Background Knowledge
Background KnowledgeBackground Knowledge
Background KnowledgeHoang Nguyen
 
Introduction to Information Security Course
Introduction to Information Security CourseIntroduction to Information Security Course
Introduction to Information Security CourseHoang Nguyen
 
Introduction to CNS Course
Introduction to CNS CourseIntroduction to CNS Course
Introduction to CNS CourseHoang Nguyen
 
Testing in the lifecycle
Testing in the lifecycleTesting in the lifecycle
Testing in the lifecycleHoang Nguyen
 
Fundamentals of Testing 2
Fundamentals of Testing 2Fundamentals of Testing 2
Fundamentals of Testing 2Hoang Nguyen
 
Fundamentals of testing 1
Fundamentals of testing 1Fundamentals of testing 1
Fundamentals of testing 1Hoang Nguyen
 
Why the Semantic Web will nerver work
Why the Semantic Web will nerver workWhy the Semantic Web will nerver work
Why the Semantic Web will nerver workHoang Nguyen
 

Plus de Hoang Nguyen (20)

Stream ciphers
Stream ciphersStream ciphers
Stream ciphers
 
Classical ciphers
Classical ciphersClassical ciphers
Classical ciphers
 
Confidentiality
ConfidentialityConfidentiality
Confidentiality
 
Information, Data and Decision Making
Information, Data and Decision MakingInformation, Data and Decision Making
Information, Data and Decision Making
 
Multiple processor systems
Multiple processor systemsMultiple processor systems
Multiple processor systems
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Background Knowledge
Background KnowledgeBackground Knowledge
Background Knowledge
 
Introduction to Information Security Course
Introduction to Information Security CourseIntroduction to Information Security Course
Introduction to Information Security Course
 
Introduction to CNS Course
Introduction to CNS CourseIntroduction to CNS Course
Introduction to CNS Course
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Nosql intro
Nosql introNosql intro
Nosql intro
 
Static Testing
Static TestingStatic Testing
Static Testing
 
Testing in the lifecycle
Testing in the lifecycleTesting in the lifecycle
Testing in the lifecycle
 
Fundamentals of Testing 2
Fundamentals of Testing 2Fundamentals of Testing 2
Fundamentals of Testing 2
 
Fundamentals of testing 1
Fundamentals of testing 1Fundamentals of testing 1
Fundamentals of testing 1
 
Why the Semantic Web will nerver work
Why the Semantic Web will nerver workWhy the Semantic Web will nerver work
Why the Semantic Web will nerver work
 
IS sum up 2011
IS sum up 2011IS sum up 2011
IS sum up 2011
 
XSLT
XSLTXSLT
XSLT
 
XPath
XPathXPath
XPath
 
XML DOM
XML DOMXML DOM
XML DOM
 

Dernier

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Dernier (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Introduction to AOS course