Chapter 17 examines various mechanisms for process synchronization and communication, as well as methods for dealing with the deadlock problem, in a distributed environment. In addition, since a distributed system may suffer from a variety of failures that are not encountered in a centralized system, we also discuss here the issue of failure in a distributed system. | CSC 322 Operating Systems Concepts Lecture - 18: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-3) Silberschatz, Galvin and Gagne 2002, Operating System Concepts, Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Chapter 3 Memory Management Virtual memory Segmentation Lecture-17 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 2 A compiler has many tables that are built up as compilation proceeds, possibly including: The source text being saved for the printed listing (on batch systems). The symbol table – the names and attributes of variables. The table containing integer, floating-point constants used. The parse tree, the syntactic analysis of the program. The stack used for procedure calls within the compiler. Segmentation Lecture-17 3 Ahmed Mumtaz Mustehsan, CIIT, Islamabad In a one-dimensional address space with growing tables, one table may bump into another. One dimensional address space Lecture-17 4 Ahmed Mumtaz . | CSC 322 Operating Systems Concepts Lecture - 18: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. (Chapter-3) Silberschatz, Galvin and Gagne 2002, Operating System Concepts, Ahmed Mumtaz Mustehsan, CIIT, Islamabad 1 Chapter 3 Memory Management Virtual memory Segmentation Lecture-17 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 2 A compiler has many tables that are built up as compilation proceeds, possibly including: The source text being saved for the printed listing (on batch systems). The symbol table – the names and attributes of variables. The table containing integer, floating-point constants used. The parse tree, the syntactic analysis of the program. The stack used for procedure calls within the compiler. Segmentation Lecture-17 3 Ahmed Mumtaz Mustehsan, CIIT, Islamabad In a one-dimensional address space with growing tables, one table may bump into another. One dimensional address space Lecture-17 4 Ahmed Mumtaz Mustehsan, CIIT, Islamabad A segmented memory allows each table to grow or shrink independently of the other tables. Segmentation Lecture-17 5 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Simplifies handling of data structures which are growing and shrinking Address space of segment n is of form (n,local address) where (n,0) is starting address Can compile segments separately from other segments Can put library in a segment and share it Can have different protections (r,w,x) for different segments Advantages of Segmentation Lecture-17 6 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Comparison Paging vs Segmentation Lecture-17 7 Ahmed Mumtaz Mustehsan, CIIT, Islamabad (a)-(d) Development of checker boarding. (e) Removal of the checker boarding by compaction. External fragging Lecture-17 8 Ahmed Mumtaz Mustehsan, CIIT, Islamabad Can compact holes by copying programs into holes This takes too much time Swapping, a picture (Revisit) Lecture-12 Ahmed Mumtaz Mustehsan, CIIT, Islamabad 9 9 Segmentation .