Αρχική ΑΕΠΠ - Δομές Δεδομένων Λειτουργικά Συστήματα Δίκτυα Υπολογιστών ΙΙ Βάσεις Δεδομένων Παιδαγωγικά - Διδακτική
Εισαγωγή στα Λ.Σ. Βασικές Δομές Η/Υ Βασικές Δομές Λ.Σ
Διεργασίες Χρονοπρογραμματισμός Συγχρονισμός
Μονοπρογραμματισμός Εναλλαγή Εικονική Μνήμη Κατάτμηση
Εμφάνιση μικρών αλλαγών - Αλλαγές κώδικα
d = 600 - p*1044 => d = 600
d = 600 - p*1024 => d = 600
0 | 2048 | 8192 |
1 | 0 | 2048 |
0 | 3072 | 8192 |
1 | 0 | 3072 |
Μετατροπές Διευθύνσεων
p = 600 div 1024 => p = 0
.
d = 600 - p*1044 => d = 600
a = 2*1024+600 => a = 2648
.
a
τη βάση του τμήματος, έτσι έχουμε τη φυσική διεύθυνση: 2648 + 3072 = 5720
p = 2199 div 1024 = > p = 2
p = 2199 div 1024 = > p = 2
d = 2199 - p*1024 => d = 151
a = 4*1024 + 151 => a = 4247
4247 + 0 = 4247
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.
Ο λογικός διαχωρισμός της μνήμης σε πολλά διαστήματα διευθύνσεων, τελείως ανεξάρτητα μεταξύ τους που καλούνται τμήματα (segments). Κάθε τμήμα αποτελείται από μία σειριακή ακολουθία διευθύνσεων, αρχίζοντας από το μηδέν και φτάνοντας σε κάποια μέγιστη τιμή. Διαφορετικά τμήματα μπορούν να έχουν διαφορετικά μεγέθη.
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.
Why are segmentation and paging sometimes combined into one scheme?
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.
Sharing segments among processes without requiring the same segment number is possible in a dynamically linked segmentation system.
Describe a mechanism by which one segment could belong to the address space of two different processes.
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.
Consider the following segment table:
Segment | Base | Length |
---|---|---|
0 | 219 | 600 |
1 | 2300 | 14 |
2 | 90 | 100 |
3 | 1327 | 580 |
4 | 1952 | 96 |
What are the physical addresses for the following logical addresses?
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.
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:
Segment | Base | Length |
---|---|---|
0 | 219 | 600 |
1 | 2300 | 14 |
2 | 90 | 100 |
3 | 1327 | 580 |
4 | 1952 | 96 |
What are the physical addresses for the following logical addresses?
Μια ιδεατή μνήμη των 34 bits του MULTICS χωρίζεται ως εξής:
Αριθμός Τμήματος (18 bits) | Αριθμός Σελίδας (6 bits) | Μετατόπιση μέσα στη σελίδα (10 bits) |
Αν έχουμε τις παρακάτω πληροφορίες:
Τμήμα | Βάση | Μήκος |
---|---|---|
0 | 2048 | 8192 |
1 | 0 | 2048 |
Για το τμήμα 0, (ένα μέρος των σελίδων)
Σελίδα | Πλαίσιο |
---|---|
0 | 2 |
1 | 6 |
2 | - |
Για το τμήμα 1, (ένα μέρος των σελίδων)
Σελίδα | Πλαίσιο |
---|---|
0 | 3 |
1 | - |
2 | 4 |
Σε ποια φυσική διεύθυνση ανήκουν οι παρακάτω διευθύνσεις;
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.
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:
Segment | Base | Length |
---|---|---|
0 | 219 | 600 |
1 | 2300 | 14 |
2 | 90 | 100 |
3 | 1327 | 580 |
4 | 1952 | 96 |
What are the physical addresses for the following logical addresses?
Copyright 2008 - Άρης Φεργάδης