Was genau ist der "Swapper" bzw was ist swapping??
Hallo Linuxer, was genau ist der Swapper?? Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber. Z.B. Vor & Nachteile?? In meinen Linux-Büchern habe ich nichts gefunden. Das ganze brauche ich für mein Studium... Ciao Andre
* Andre Heine:
was genau ist der Swapper??
Ein kleines grünes Ding :-)
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen wohl in Wirklichkeit erstmal Paging passiert, also das auslagern einzelner Speicherseiten und nicht ganzer Prozesse.
Z.B. Vor & Nachteile??
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast. Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-) Für genauere Informationen bitte genauere Fragen. Thorsten -- Thorsten Jens, Chrome p0rnK1ng from da =<= stoned m0vement =>= (telnet koeln.ccc.de 31337)
moin,
* Andre Heine:
was genau ist der Swapper??
Ein kleines grünes Ding :-)
Hmmm, gibst die auch in rot?? :-)
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen wohl in Wirklichkeit erstmal Paging passiert, also das auslagern einzelner Speicherseiten und nicht ganzer Prozesse.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Z.B. Vor & Nachteile??
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-)
Für genauere Informationen bitte genauere Fragen.
Gibt es noch mehr Nachteile?? Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht? Ciao Andre
Am Mon, 07 Mai 2001 schrieb Andre Heine:
moin,
* Andre Heine:
was genau ist der Swapper??
Ein kleines grünes Ding :-)
Hmmm, gibst die auch in rot?? :-)
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen wohl in Wirklichkeit erstmal Paging passiert, also das auslagern einzelner Speicherseiten und nicht ganzer Prozesse.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Z.B. Vor & Nachteile??
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-)
Für genauere Informationen bitte genauere Fragen.
Gibt es noch mehr Nachteile?? Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Swapping hat *keine* Nachteile. Es wird vom System ja nur im Notfall benutzt, d.h., wenn Deine Kiste sonst klemmen oder gar abpfeifen würde. Wenn Dir das swappen zu langsam ist - bau mehr RAM ein. Aber auch dann ist der Swapper einfach eine gute Sicherheit gegen ein totales Zuparken des RAM und damit des Systemstillstands. Mit Multitasking hat swapping im weiteren Sinne (siehe aber unten) im Grunde nix zu tun (Beweis: Windoof hat auch eine Swap-Datei ;-)), aber da bei mehreren Tasks (und oft ist damit gemeint: mehreren Usern) die Speicherlast noch unkalkulierbarer ist (und früher RAM sauteuer war), ist swapping afaik etwa so alt wie Unix. Konkret unterscheidet man übrigens zwischen swapping: Prozesse werden mit ihrem RAM-Bereich vollständig auf die Platte (meist "/swap") ausgelagert und werden erst, wenn sie wieder Rechenzeit kriegen, wieder auf den RAM geladen - das ist swapping im engeren Sinne und 1.nur bei Multitasking sinnvoll und 2. die langsamere Variante, weil alle Seiten des Prozesses rausfliegen) und paging: nur einzelne RAM-Seiten eines Prozesses, die dieser gereade nicht zu brauchen scheint (leider irrt das System manchmal), werden auf das swap-device gepackt und bei Bedarf zurückgeholt, das geht natürlich oft schneller und ist an Multitasking nicht gebunden HTH -- may the tux be with You! Joerg Thuemmler sysadmin@vordruckleitverlag.de Vordruck Leitverlag GmbH Berlin, ZNL Freiberg Halsbruecker Str. 31b, 09599 Freiberg, Germany Tel. +49 (0)3731/303121
Joerg Thuemmler wrote:
was genau ist der Swapper??
kswapd im wesentlichen.
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Ein/Auslagern von Speicherseiten im Allgemeinen. Es kann z.B. auch shared memory sein.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Es kann auch eine Datei sein. Und unter Unix ist, wie man weiß, so ziemlich alles eine Datei. Ergo können alle möglichen Geräte zum Swappen verwendet werden. Mit etwas Bastelei kann man auch über Netz swappen.
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Im allgemeinen ist es sinnvoll, Daten auszulagern, die sehr lange nicht mehr benutzt wurden. Es gibt verschiedene Algorithmen, die versuchen, diesen Vorgang zu optimieren.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-)
Swapspace ist kein Ersatz für RAM. Swappen dauert um den Faktor länger, den das Spawmedium langsamer ist als Dein RAM. Wenn die Maschine ständig Speicherseiten auslagern muß, kommt dies einem Stillstand gleich.
Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Nein. Du kannst das Swapverhalten übrigens über einige Dateien unter /proc/sys/vm/ einstellen. Insbesondere freepages ist interessant, wenn Du das System ständig am Limit fährst, aber doch häufiger mal kurzfristig einigen freien Speicher brauchst. Damit das System dann nicht erst zu Swappen beginnt, kannst Du hier die Zahl der freien Speicherseiten erhöhen, die durch "sanftes Swapping" freigeräumt werden. Das bringt natürlich nichts, wenn die Prozesse permanent mehr Speicher verlangen als verfügbar ist. Aber doch einiges, wenn viele Prozesse (wie auf Desktops üblich) über längere Zeit "schlafen". - Matthias
* Andre Heine schrieb am 07.Mai.2001: [Hier fehlt eine Autorenangabe]
* Andre Heine:
was genau ist der Swapper??
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen
Nein, der Swapper ist kein eigener Prozess, sondern Teil des Kernels.
wohl in Wirklichkeit erstmal Paging passiert, also das auslagern einzelner Speicherseiten und nicht ganzer Prozesse.
ACK.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Das ist korrekt. Aber auch Swap Dateien wären möglich, aber nicht so effektiv.
Z.B. Vor & Nachteile??
Wozu. Vor & Nachteil im Bezug zu was? Swapper vs. Pager, oder Swapper vs. nur Hauptspeicher oder was?
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-)
Für genauere Informationen bitte genauere Fragen.
Gibt es noch mehr Nachteile?? Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Wie schon geschrieben wurde, wird durch Swapping der Speicherraum erhöht. In der Tat wäre in früheren Zeiten, wo man gerade ein paar wenige MB Hauptspeicher hatte, wenn überhaupt, Multitasking ohne Swapping nur schlecht denkbar. Grundsätzlich braucht man es aber nicht. Wenn Du es genauer wissen willst, so kauf Dir ein Buch über das UNIX-System. Es gibt Bücher, da wird auch Swapping detaliert beschrieben. Leider habe ich kein Titel, geschweige eine ISBN Nummer zur Hand. Bernd -- ACK = ACKnowledge = Zustimmung | NAC = No ACknowledge = keine Zustimmung DAU = Dümmster Anzunehmender User | LOL = Laughing Out Loud = Lautes Lachen IIRC = If I Remember Correctly = Falls ich mich richtig erinnere OT = Off Topic = Am Thema (der Liste) vorbei |Zufallssignatur 11
Moin,
* Andre Heine schrieb am 07.Mai.2001:
[Hier fehlt eine Autorenangabe]
* Andre Heine:
was genau ist der Swapper??
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen
Nein, der Swapper ist kein eigener Prozess, sondern Teil des Kernels.
wohl in Wirklichkeit erstmal Paging passiert, also das auslagern einzelner Speicherseiten und nicht ganzer Prozesse.
ACK.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Das ist korrekt. Aber auch Swap Dateien wären möglich, aber nicht so effektiv.
Z.B. Vor & Nachteile??
Wozu. Vor & Nachteil im Bezug zu was? Swapper vs. Pager, oder Swapper vs. nur Hauptspeicher oder was?
Ok, ich mache nun gerade ein Fernstudium in C/C++ unter Linux. (Habe in einer NewsGroup gelesen es sein Amtssprache!) Folgende Aufgabe: Was versteht man unter Swapping bzw. dem Prozeß "Swapper"? Nennen Sie Vor- und Nachteile des Swappings! ---------------------------------------------------- Meine Antwort: Bei dem Systemstart wird der Urprozeß (der sog. Swapper) gestartet. Er ist verantwortlich für die Ein/Auslagerung von Prozessen verantwortlich. Die Prozesse werden nach dem FIFO Prinzip Ein/Ausgelagert! Der Swapper startet den Vater aller Prozesse (sog. init). So gibt es keinen "Herrenlosen Prozeß" ---------------------------------------------------- Gut, das habe ich heraus gelesen, es gibt noch den "agetty",die Sache mit dem Paging & Frames habe ich auch heraus gefunden. Nur halt nichts zu den Nachteilen. Vorteile wurden ja schon einige im Thread genannt Dank nochmal allen zusammen. Ciao Andre
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-) Für genauere Informationen bitte genauere Fragen.
Gibt es noch mehr Nachteile?? Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Wie schon geschrieben wurde, wird durch Swapping der Speicherraum erhöht. In der Tat wäre in früheren Zeiten, wo man gerade ein paar wenige MB Hauptspeicher hatte, wenn überhaupt, Multitasking ohne Swapping nur schlecht denkbar. Grundsätzlich braucht man es aber nicht.
Wenn Du es genauer wissen willst, so kauf Dir ein Buch über das UNIX-System. Es gibt Bücher, da wird auch Swapping detaliert beschrieben. Leider habe ich kein Titel, geschweige eine ISBN Nummer zur Hand.
Bernd
Vorwort (leider wieder mal :-(): Muss das Vollquoting sein? On Die, Mai 08, 2001 at 09:56:49 +0200, Andre Heine wrote: [...]
Ok, ich mache nun gerade ein Fernstudium in C/C++ unter Linux. (Habe in einer NewsGroup gelesen es sein Amtssprache!)
Aha.
Folgende Aufgabe:
Was versteht man unter Swapping bzw. dem Prozeß "Swapper"? Nennen Sie Vor- und Nachteile des Swappings! ---------------------------------------------------- Meine Antwort: Bei dem Systemstart wird der Urprozeß (der sog. Swapper) gestartet. Er ist verantwortlich für die Ein/Auslagerung von Prozessen verantwortlich. Die Prozesse werden nach dem FIFO Prinzip Ein/Ausgelagert! Der Swapper startet den Vater aller Prozesse (sog. init). So gibt es keinen "Herrenlosen Prozeß" ----------------------------------------------------
<*brr* schüttel> Das war ziemlich daneben. Ich schließe mich Bernds Ratschlag an: Besorg Dir Literatur zum Thema und lies lieber erstmal eine Weile ;-) Du hast noch ein paar _grundlegende_ Verständnis-Lücken, die man IMHO auch nicht hier im Rahmen der ML ausräumen kann. Ich will jetzt nicht alle Fehler in Deinen paar Zeilen analysieren (dann hätte ich ziemlich zu tun), nur ein paar Hinweise: Der Swapper ist nicht der Urvater, die Prozesse werden mitnichten nach dem FIFO-Prinzip ein- und ausgelagert, der Swapper startet nicht den init, der Swapper hat nichts mit herrenlosen Prozessen zu tun (was auch immer das sein mag).
Gut, das habe ich heraus gelesen, es gibt noch den "agetty",die Sache mit dem Paging & Frames habe ich auch heraus gefunden.
Was um Himmelswillen haben der agetty und Frames mit dem Swapping zu tun?
Nur halt nichts zu den Nachteilen. Vorteile wurden ja schon einige im Thread genannt
Siehe weiter unten.
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-) Für genauere Informationen bitte genauere Fragen.
Gibt es noch mehr Nachteile?? Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Reicht das nicht? Müssen es unbedingt mehr Nachteile sein? Warum sollte man dann denn sowas verwenden? Nochmal: Kauf (oder leihe) Dir ein paar gute Bücher zum Thema, Du brauchst dringend Grundlagenwissen! SCNR Jan
Hallo Andre, hallo Jan, Jan Trippler schrieb: [...]
Folgende Aufgabe:
Was versteht man unter Swapping bzw. dem Prozeß "Swapper"? Nennen Sie Vor- und Nachteile des Swappings!
Was soll denn überhaupt der zweite Teil der Frage? Wer als EDV-Dozent so ein hanebüchenes Zeug wie "Nachteile des Swappings" zu fragen wagt, gehört standrechtlich nach Redmond gebeamt :-(((( Oder ist die Frage aus dem Zusammenhang gerissen, und es war Paging mit Swapping zu vergleichen?
---------------------------------------------------- Meine Antwort: Bei dem Systemstart wird der Urprozeß (der sog. Swapper) gestartet. Er ist verantwortlich für die Ein/Auslagerung von Prozessen verantwortlich. Die Prozesse werden nach dem FIFO Prinzip Ein/Ausgelagert! Der Swapper startet den Vater aller Prozesse (sog. init). So gibt es keinen "Herrenlosen Prozeß" ----------------------------------------------------
<*brr* schüttel> Das war ziemlich daneben. Ich schließe mich Bernds Ratschlag an: Besorg Dir Literatur zum Thema und lies lieber erstmal eine Weile ;-) Du hast noch ein paar _grundlegende_ Verständnis-Lücken, die man IMHO auch nicht hier im Rahmen der ML ausräumen kann.
Fully ACK!
Ich will jetzt nicht alle Fehler in Deinen paar Zeilen analysieren (dann hätte ich ziemlich zu tun), nur ein paar Hinweise: Der Swapper ist nicht der Urvater, die Prozesse werden mitnichten nach dem FIFO-Prinzip ein- und ausgelagert, der Swapper startet nicht den init, der Swapper hat nichts mit herrenlosen Prozessen zu tun (was auch immer das sein mag).
Vielleicht sind Prozesse gemeint, deren Parent ohne wait beendet wurde, und die somit von init als parent übernommen wurden?
Gut, das habe ich heraus gelesen, es gibt noch den "agetty",die Sache mit dem Paging & Frames habe ich auch heraus gefunden.
Was um Himmelswillen haben der agetty und Frames mit dem Swapping zu tun?
<StocherImNebel> Hmm, bei manchen Betriebssystemen (nicht Unices) wird beim Paging unterschieden zwischen logischen Seiten (aus der Sicht des BS als Software == Pages) und physischen Seiten des Speichers als Hardware (Frames). Bei Telefunken hieß das mal "Seiten" und "Kacheln". </StocherImNebel> [...] und noch scöne Tage! Norbert
* Bernd Brodesser:
* Andre Heine schrieb am 07.Mai.2001:
[Hier fehlt eine Autorenangabe]
* Andre Heine:
was genau ist der Swapper??
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Genau. Der Swapper ist der Prozess, der swappt. Obwohl da inzwischen
Nein, der Swapper ist kein eigener Prozess, sondern Teil des Kernels.
Da wär ich gar nicht mal so sicher ... Natürlich wird der kswapd von Kernel aus aufgerufen, aber es ist zumindest ein eigener Thread. Ausserdem hat er seine eigene PID, deswegen denke ich dass der kswapd schon eine eigener Prozess ist. Das fork() hab ich aber gerade nicht gefunden ... Thorsten -- bad spellers of the world untie!
Am Dienstag, 8. Mai 2001 23:48 schrieb Thorsten Jens:
Nein, der Swapper ist kein eigener Prozess, sondern Teil des Kernels.
Da wär ich gar nicht mal so sicher ... Natürlich wird der kswapd von Kernel aus aufgerufen, aber es ist zumindest ein eigener Thread. Ausserdem hat er seine eigene PID, deswegen denke ich dass der kswapd schon eine eigener Prozess ist. Das fork() hab ich aber gerade nicht gefunden ...
Linux realisiert alle Threads als "eigene Prozesse", zumindest tauchen sie mit einer eigenen PID in der Prozesstabelle auf, sind also daran nicht von normalen Prozessen zu unterscheiden. Heiner -- Heiner Lamprecht Philosophenweg 79 D - 72076 Tuebingen email: heiner@kijumfo.de http://www.kijumfo.de GnuKontor: http://agenda21.ggi.uni-tuebingen.de/heiner/gk/ KFLog: http://agenda21.ggi.uni-tuebingen.de/heiner/kflog/
Hallo Heiner, * Heiner Lamprecht schrieb:
Am Dienstag, 8. Mai 2001 23:48 schrieb Thorsten Jens:
Nein, der Swapper ist kein eigener Prozess, sondern Teil des Kernels.
Da wär ich gar nicht mal so sicher ... Natürlich wird der kswapd von Kernel aus aufgerufen, aber es ist zumindest ein eigener Thread. Ausserdem hat er seine eigene PID, deswegen denke ich dass der kswapd schon eine eigener Prozess ist. Das fork() hab ich aber gerade nicht gefunden ...
Linux realisiert alle Threads als "eigene Prozesse", zumindest tauchen sie mit einer eigenen PID in der Prozesstabelle auf, sind also daran nicht von normalen Prozessen zu unterscheiden.
Zu dem Thema gibt es in der c't 09/2001 Seite 228 einen sehr lesenswerten Artikel von Andreas Jäger. Es gibt wohl kein POSIX konformes Thread-Handling im Linux-Kernel. ciao Waldemar -- * A good website for linuxsoftware: | (o_ * * http://www.sourceforge.net | //\ * * Linux rulez! ;-) | V_/_ * * GnuPG-Key: 0xBE21BD90 | Tux: #155220 | ICQ: 64035650 *
* Waldemar Brodkorb schrieb am 09.Mai.2001:
Zu dem Thema gibt es in der c't 09/2001 Seite 228 einen sehr lesenswerten Artikel von Andreas Jäger. Es gibt wohl kein POSIX konformes Thread-Handling im Linux-Kernel.
Huch, POSIX kennt Threads? Ich halte das Verhalten von Linux für vernünftiger. Bernd -- Bei Fragen an die Liste erst mal nachschauen, ob es diese Frage nicht schon einmal gegeben hat. Ein Archiv der Liste findest Du auf: http://lists.suse.com/archives/suse-linux |Zufallssignatur 7
On Wednesday 09 May 2001 14:40, Bernd Brodesser wrote:
* Waldemar Brodkorb schrieb am 09.Mai.2001:
Zu dem Thema gibt es in der c't 09/2001 Seite 228 einen sehr lesenswerten Artikel von Andreas Jäger. Es gibt wohl kein POSIX konformes Thread-Handling im Linux-Kernel.
Huch, POSIX kennt Threads? Ich halte das Verhalten von Linux für vernünftiger.
Ja, die nennt man dann auch Pthreads. Aber bei den Threads kocht wohl jeder noch sein eignes Süppchen. Ausserdem sagt POSIX logischerweise garnicht, das die Threads im Kernel implementiert sein müssen und so ist es dann auch in Linux. Christian
participants (10)
-
Andre Heine
-
Bernd Brodesser
-
Christian Hilgers
-
Heiner Lamprecht
-
Jan.Trippler@t-online.de
-
Joerg Thuemmler
-
Matthias Kleine
-
Norbert Kordts
-
Thorsten Jens
-
Waldemar Brodkorb