• 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

                              • debug
                              Macros | Constants
                              output.h File Reference

                              Debug macros enabling debug output on a separate window for each core. More...

                              #include "debug/nullstream.h"
                              #include "device/textstream.h"
                              #include "machine/core.h"
                              + Include dependency graph for output.h:
                              + This graph shows which files directly or indirectly include this file:

                              Macros

                              #define DBG_VERBOSE   nullstream
                               An output stream, which is only displayed in the debug window in verbose mode. More...
                               
                              #define DBG   dout[Core::getID()]
                               An output stream, which is displayed in the debug window of the core it was executed on. More...
                               

                              Constants

                              TextStream dout [Core::MAX]
                               Debug window. More...
                               

                              Detailed Description

                              Debug macros enabling debug output on a separate window for each core.

                              Macro Definition Documentation

                              #define DBG_VERBOSE   nullstream

                              An output stream, which is only displayed in the debug window in verbose mode.

                              Note
                              If a serial console has been implemented, the output can be redirected to the serial stream instead (by changing the macro) – this makes the (usually) very large output more readable (since it allows scrolling back)
                              #define DBG   dout[Core::getID()]

                              An output stream, which is displayed in the debug window of the core it was executed on.

                              In single core (OOStuBS) this is just an alias to the debug window object dout. However, on a multi core system a debug window for each core is required, therefore dout has to be an TextStream object array with the core ID as array index – the selection is done via Core::getID()

                              Warning
                              In case of a very unfavorable scheduling, it is theoretically possible that the debug output in a multi core system is displayed on the wrong (previous) core.

                              Variable Documentation

                              TextStream dout[Core::MAX]
                              extern

                              Debug window.

                              Debug output using DBG like DBG << "var = " << var << endl should be displayed in window dedicated to the core it is executed on.

                              While this is quite easy on single core systems like OOStuBS – they only require a single TextStream object called dout – multi core systems like MPStuBS need an object array with one window per core. In the latter case direct list initialization can be used:

                              TextStream dout[Core::MAX]{
                              {0, 40, 17, 21}, // Debug window for core 0, like TextStream(0, 40, 17, 21)
                              {40, 80, 17, 21}, // Debug window for core 1, like TextStream(40, 80, 17, 21)
                              //...
                              };
                              TextStream
                              Output text (form different data type sources) on screen in text mode.
                              Definition: textstream.h:23
                              Core::MAX
                              const unsigned MAX
                              Maximum number of supported CPUs.
                              Definition: core.h:28
                              dout
                              TextStream dout[Core::MAX]
                              Debug window.
                              Definition: main.cc:7

                              The debug windows in should be located right below the normal output window without any overlap and should be able to display at least 3 lines. In MPStuBS, two windows can be placed side-by-side, having 40 columns each.

                              As an optional extension, the distribution of the windows can be done automatically in MPStuBS (according to the actual numbers of cores) with TextStream::arrange() – in this case the standard constructor (without parameters) is sufficient.

                              Optional:
                              Automatically arrange windows with TextStream::arrange()
                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

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