Αρχική ΑΕΠΠ - Δομές Δεδομένων Λειτουργικά Συστήματα Δίκτυα Υπολογιστών ΙΙ Βάσεις Δεδομένων Παιδαγωγικά - Διδακτική

Εισαγωγικά

Εισαγωγή στα Λ.Σ. Βασικές Δομές Η/Υ Βασικές Δομές Λ.Σ

Διεργασίες

Διεργασίες Χρονοπρογραμματισμός Συγχρονισμός

Αδιέξοδα

Μνήμη

Μονοπρογραμματισμός Εναλλαγή Εικονική Μνήμη Κατάτμηση

Είσοδος / Έξοδος

Σύστημα Αρχείων

Διεπαφή Υλοποίηση

 Ιστορικό Πρόσφατες αλλαγές Εκτύπωση Αναζήτηση

Ιστορικό: OS.Segmentation

Εμφάνιση μικρών αλλαγών - Αλλαγές κώδικα

16-08-2008 (17:26) από 194.63.237.22 -
Αλλαγή σειράς 172 από:
  1. Η μετατόπιση μέσα στη σελίδα είναι: d = 600 - p*1044 => d = 600
σε:
  1. Η μετατόπιση μέσα στη σελίδα είναι: d = 600 - p*1024 => d = 600
15-08-2008 (20:18) από Άρης -
Αλλαγή σειράς 142 από:

border=1px

σε:
Αλλαγή σειράς 149 από:

border=1px

σε:
15-08-2008 (20:05) από Άρης -
Αλλαγή σειρών 138-140 από:
020488192
102048
σε:
030728192
103072
Αλλαγή σειρών 158-159 από:
σε:
  1. 1, 2199
Αλλαγή σειρών 165-188 από:
  1. Σελίδες ανά Τμήμα: 26=64
σε:
  1. Σελίδες ανά Τμήμα: 26 = 64
  2. Μέγεθος Σελίδας: 210 = 1024

Μετατροπές Διευθύνσεων

  1. 0, 600
    1. Η διεύθυνση 600 ανήκει στο τμήμα 0.
    2. Διαιρώντας το 600 με το μέγεθος σελίδας και παίρνοντας το ακέραιο μέρος βρίσκουμε σε ποια σελίδα ανήκει: p = 600 div 1024 => p = 0.
    3. Η μετατόπιση μέσα στη σελίδα είναι: d = 600 - p*1044 => d = 600
    4. Από τον πίνακα σελίδων για το τμήμα 0, βρίσκουμε ότι η σελίδα 0 αντιστοιχεί στο πλαίσιο 2. H διεύθυνση γίνεται: a = 2*1024+600 => a = 2648.
    5. Προσθέτουμε στην διεύθυνση a τη βάση του τμήματος, έτσι έχουμε τη φυσική διεύθυνση: 2648 + 3072 = 5720
  2. 0, 2199
    1. Αριθμός σελίδας: p = 2199 div 1024 = > p = 2
    2. Από τον πίνακα σελίδων βλέπουμε ότι το πλαίσιο που αντιστοιχεί στη σελίδα 2 δεν υπάρχει. Άρα έχουμε σφάλμα σελίδας
  3. 1, 2199
    1. Αριθμός σελίδας: p = 2199 div 1024 = > p = 2
    2. Μετατόπιση: d = 2199 - p*1024 => d = 151
    3. Από τον πίνακα σελίδων του τμήματος 1, έχουμε για σελίδα 2 πλαίσιο 4. Η διεύθυνση γίνεται: a = 4*1024 + 151 => a = 4247
    4. Προσθέτουμε τη βάση του τμήματος 1 και έχουμε φυσική διεύθυνση: 4247 + 0 = 4247

15-08-2008 (19:46) από Άρης -
Αλλαγή σειρών 6-7 από:

Why are segmentation and paging sometimes combined into one scheme?

σε:

Τί είναι η κατάτμηση;

Αλλαγή σειρών 12-13 από:

Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful when the page table becomes very large. A large contiguous section of the page table that is unused can be collapsed into a single segment table entry with a page table address of zero. Paged segmentation handles the case of having very long segments that require a lot of time for allocation. By paging the segments, we reduce wasted memory due to external fragmentation as well as simplify the allocation.

σε:

Ο λογικός διαχωρισμός της μνήμης σε πολλά διαστήματα διευθύνσεων, τελείως ανεξάρτητα μεταξύ τους που καλούνται τμήματα (segments). Κάθε τμήμα αποτελείται από μία σειριακή ακολουθία διευθύνσεων, αρχίζοντας από το μηδέν και φτάνοντας σε κάποια μέγιστη τιμή. Διαφορετικά τμήματα μπορούν να έχουν διαφορετικά μεγέθη.

Αλλαγή σειρών 20-21 από:

Describe a mechanism by which one segment could belong to the address space of two different processes.

σε:

Γιατί επινοήθηκε η τεχνική της κατάτμησης;

Αλλαγή σειρών 26-27 από:

Since segment tables are a collection of base–limit registers, segments can be shared when entries in the segment table of two different jobs point to the same physical location. The two segment tables must have identical base pointers and the shared segment number must be the same in the two processes.

σε:

Για να επιτρέπεται στα προγράμματα και τα δεδομένα να διασπώνται σε λογικά ανεξάρτητους χώρους διευθύνσεων και για να υποβοηθηθεί ο διαμοιρασμός και η προστασία της μνήμης.

Αλλαγή σειράς 31 από:
σε:
Αλλαγή σειρών 34-35 από:

Explain why it is easier to share a reentrant module using segmentation than it is to do so when pure paging is used.

σε:

Why are segmentation and paging sometimes combined into one scheme?

Αλλαγή σειρών 40-41 από:

Since segmentation is based on a logical division of memory rather than a physical one, segments of any size can be shared with only one entry in the segment tables of each user. With paging there must be a common entry in the page tables for each page that is shared.

σε:

Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful when the page table becomes very large. A large contiguous section of the page table that is unused can be collapsed into a single segment table entry with a page table address of zero. Paged segmentation handles the case of having very long segments that require a lot of time for allocation. By paging the segments, we reduce wasted memory due to external fragmentation as well as simplify the allocation.

Αλλαγή σειρών 48-51 από:

Sharing segments among processes without requiring the same segment number is possible in a dynamically linked segmentation system.

  • Define a system that allows static linking and sharing of segments without requiring that the segment numbers be the same.
  • Describe a paging scheme that allows pages to be shared without requiring that the page numbers be the same.
σε:

Describe a mechanism by which one segment could belong to the address space of two different processes.

Αλλαγή σειρών 54-55 από:

Both of these problems reduce to a program being able to reference both its own code and its data without knowing the segment or page number associated with the address. MULTICS solved this problem by associating four registers with each process. One register had the address of the current program segment, another had a base address for the stack, another had a base address for the global data, and so on. The idea is that all references have to be indirect through a register that maps to the current segment or page number. By changing these registers, the same code can execute for different processes without the same page or segment numbers.

σε:

Since segment tables are a collection of base–limit registers, segments can be shared when entries in the segment table of two different jobs point to the same physical location. The two segment tables must have identical base pointers and the shared segment number must be the same in the two processes.

Αλλαγή σειρών 60-78 από:

Άσκηση

Consider the following segment table:

SegmentBaseLength
0219600
1230014
290100
31327580
4195296

What are the physical addresses for the following logical addresses?

  1. 0,430
  2. 1,10
  3. 2,500
  4. 3,400
  5. 4,112
σε:

Ερώτηση

Explain why it is easier to share a reentrant module using segmentation than it is to do so when pure paging is used.

Αλλαγή σειρών 68-73 από:
  1. 219 + 430 = 649
  2. 2300 + 10 = 2310
  3. illegal reference, trap to operating system
  4. 1327 + 400 = 1727
  5. illegal reference, trap to operating system
σε:

Since segmentation is based on a logical division of memory rather than a physical one, segments of any size can be shared with only one entry in the segment tables of each user. With paging there must be a common entry in the page tables for each page that is shared.

Πρόσθεση σειρών 73-164:

Ερώτηση

Sharing segments among processes without requiring the same segment number is possible in a dynamically linked segmentation system.

  • Define a system that allows static linking and sharing of segments without requiring that the segment numbers be the same.
  • Describe a paging scheme that allows pages to be shared without requiring that the page numbers be the same.

Απάντηση

Both of these problems reduce to a program being able to reference both its own code and its data without knowing the segment or page number associated with the address. MULTICS solved this problem by associating four registers with each process. One register had the address of the current program segment, another had a base address for the stack, another had a base address for the global data, and so on. The idea is that all references have to be indirect through a register that maps to the current segment or page number. By changing these registers, the same code can execute for different processes without the same page or segment numbers.


Άσκηση

Consider the following segment table:

SegmentBaseLength
0219600
1230014
290100
31327580
4195296

What are the physical addresses for the following logical addresses?

  1. 0,430
  2. 1,10
  3. 2,500
  4. 3,400
  5. 4,112

Απάντηση

  1. 219 + 430 = 649
  2. 2300 + 10 = 2310
  3. illegal reference, trap to operating system
  4. 1327 + 400 = 1727
  5. illegal reference, trap to operating system

Άσκηση

Μια ιδεατή μνήμη των 34 bits του MULTICS χωρίζεται ως εξής:

Αριθμός Τμήματος (18 bits)Αριθμός Σελίδας (6 bits)Μετατόπιση μέσα στη σελίδα (10 bits)
  1. Πόσα τμήματα μπορεί έχει;
  2. Πόσες σελίδες έχει το κάθε τμήμα (μέγιστο);
  3. Ποιο είναι το μέγεθος της σελίδας;

Αν έχουμε τις παρακάτω πληροφορίες:

ΤμήμαΒάσηΜήκος
020488192
102048

Για το τμήμα 0, (ένα μέρος των σελίδων)

border=1px

ΣελίδαΠλαίσιο
02
16
2-

Για το τμήμα 1, (ένα μέρος των σελίδων)

border=1px

ΣελίδαΠλαίσιο
03
1-
24

Σε ποια φυσική διεύθυνση ανήκουν οι παρακάτω διευθύνσεις;

  1. 0, 600
  2. 0, 2199

Απάντηση

  1. Πλήθος Τμημάτων: 218 = 262144
  2. Σελίδες ανά Τμήμα: 26=64
15-08-2008 (19:14) από Άρης -
Διαγραφή σειρών 93-106:

Ερώτηση

Απάντηση


15-08-2008 (19:09) από Άρης -
Αλλαγή σειρών 1-107 από:

Κατάτμηση

σε:

Κατάτμηση

Ερώτηση

Why are segmentation and paging sometimes combined into one scheme?

Απάντηση

Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful when the page table becomes very large. A large contiguous section of the page table that is unused can be collapsed into a single segment table entry with a page table address of zero. Paged segmentation handles the case of having very long segments that require a lot of time for allocation. By paging the segments, we reduce wasted memory due to external fragmentation as well as simplify the allocation.


Ερώτηση

Describe a mechanism by which one segment could belong to the address space of two different processes.

Απάντηση

Since segment tables are a collection of base–limit registers, segments can be shared when entries in the segment table of two different jobs point to the same physical location. The two segment tables must have identical base pointers and the shared segment number must be the same in the two processes.


Ερώτηση

Explain why it is easier to share a reentrant module using segmentation than it is to do so when pure paging is used.

Απάντηση

Since segmentation is based on a logical division of memory rather than a physical one, segments of any size can be shared with only one entry in the segment tables of each user. With paging there must be a common entry in the page tables for each page that is shared.


Ερώτηση

Sharing segments among processes without requiring the same segment number is possible in a dynamically linked segmentation system.

  • Define a system that allows static linking and sharing of segments without requiring that the segment numbers be the same.
  • Describe a paging scheme that allows pages to be shared without requiring that the page numbers be the same.

Απάντηση

Both of these problems reduce to a program being able to reference both its own code and its data without knowing the segment or page number associated with the address. MULTICS solved this problem by associating four registers with each process. One register had the address of the current program segment, another had a base address for the stack, another had a base address for the global data, and so on. The idea is that all references have to be indirect through a register that maps to the current segment or page number. By changing these registers, the same code can execute for different processes without the same page or segment numbers.


Άσκηση

Consider the following segment table:

SegmentBaseLength
0219600
1230014
290100
31327580
4195296

What are the physical addresses for the following logical addresses?

  1. 0,430
  2. 1,10
  3. 2,500
  4. 3,400
  5. 4,112

Απάντηση

  1. 219 + 430 = 649
  2. 2300 + 10 = 2310
  3. illegal reference, trap to operating system
  4. 1327 + 400 = 1727
  5. illegal reference, trap to operating system

Ερώτηση

Απάντηση


22-07-2008 (19:14) από Άρης -
Πρόσθεση σειράς 1:

Κατάτμηση

Τελευταία ενημέρωση: 16-08-2008 (17:26)

Copyright 2008 - Άρης Φεργάδης