• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Aufgabe 6: Synchronisation
                    • Aufgabe 7: Anwendung
                      • Assembler Crashkurs
                        • C++ Crashkurs
                          • Entwicklungsumgebung
                            • FAQ
                              • Ruhmeshalle
                              • Evaluation

                              Aufgabe 5: Zeitscheiben

                              APIC-Timer Information

                              The Local APIC of each processor core has a high-resolution timer which can be utilized to generate interrupts. Unfortunately, the timer's frequency has not been standardized and may vary across different processor generations. Therefore it is necessary to calibrate it using another time source, like the Programmable Interrupt Timer (PIT) for example.

                              Programming the Timer

                              There are four memory mapped 32-bit registers used to program the LAPIC's timer. Below is a table showing each register with its address in physical memory:

                              Address Register Name
                              0xfee00320 LVT Timer Register (aka Timer Control Register)
                              0xfee00380 Initial Count Register (*ICR*)
                              0xfee00390 Current Count Register (*CCR*)
                              0xfee003e0 Divide Configuration Register

                              The ICR is used to program the timer's initial value from which it will count down to zero. The CCR, on the other hand, can be read to get the timer's current value. In order to reset the timer, effectively stopping it, you can set the ICR to 0.

                              The Control Register, as well as the Divider Configuration Register are used to control the timer's behavior. The Control Register comprises the following control bits:

                              Bit(s) Value & Meaning
                              31-19 *(reserviert)*
                              18-17 Mode of Operation
                              0 one-shot (stops at 0)
                              1 periodic (restarts the timer, using the ICR's value each time the timer reaches 0))
                              2 TSC-Deadline (Compare with an absolute time via a special register, ICR and CCR are ignored)
                              3 *(reserved)*
                              16 Mask Interrupts
                              0 generate interrupts
                              1 do not generate interrupts
                              15-13 *(reserviert)*
                              12 Interrupt Status (read-only)
                              0 idle (no interrupts is pending)
                              1 interrupt pending
                              7-0 interrupt vector used when delivering interrupts

                              The Divider Configuration Register is used to control the timer's tick rate. We already have implemented the mapping from dividers to their respective register values for you. You can simply call the function LAPIC::Timer::getClockDiv() to retrieve it. A detailed explanation of how the mapping works can be found in the Intel Software Developer's Manual.

                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

                              Schlossplatz 4
                              91054 Erlangen
                              • Impressum
                              • Datenschutz
                              • Barrierefreiheit
                              • Facebook
                              • RSS Feed
                              • Xing
                              Nach oben