I read that there are segments of each process (stack segment, code segment) and each virtual address has segment number and offset this scheme allows code sharing between processes. I didn't understand the idea of sharing please explain the sharing with an example ?
How segmentation enables sharing of code or data?
556 Views Asked by Waqar Ul Khaf At
1
There are 1 best solutions below
Related Questions in VIRTUAL-MEMORY
- Linux - process killed when linking section into lowest 2 MB of memory?
- Prevent the OS from swapping objects to virtual memory/disk in Java?
- Why bother with stack sizes?
- Explain to me this solved matrix normalization exercise?
- How can `NSUserDefaults synchronize` runs so fast?
- How to deal with big objects on runtime
- mmap man page on Mac
- How segmentation enables sharing of code or data?
- Make all pages readable/writable/executable
- Can a process have more then 1 page tables?
- How do Unix systems keep track of shared memory when processes fork()?
- How reduce cassandra virtual memory usage?
- Pages In Virtual Address Space Equation
- Access process memory directly
- Is there a way to find the file names of files mapped to the virtual memory area of a process in the linux kernel?
Related Questions in MEMORY-SEGMENTATION
- Why do we need AX instead of MOV DS, data directly with a segment?
- how does the OS determine null pointer access without checking all pointer addresses?
- Privilege level checking when accessing code segment
- How segmentation enables sharing of code or data?
- load_seg_reg(ES, 0xfffc): invalid segment when trying to run kernel code from boot sector
- What is the advantage of using segment registers (today)?
- How segmentation works and how the physical memory address is calculated from segment table
- Programmers and segmentation in operating systems
- How are segment registers unused in protected mode memory addressing in modern x86 systems?
- How can the processor discern a far return from a near return?
- x86 Segmentation in User-Mode
- How does Assembler find variables in memory?
- How to get .text segment statistics in IDA Pro?
- x86 - Switching from 32-bit to 64-bit via RETF
- Wow64 subsystem and its implementation on x86_64
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you are describing is largely obsolete. The use of segments was a kludge in the early intel processors that needlessly lived on for decades. Segments go away with 64 bit intel.The segment is usually specified using a register, not as part of the address.
As to your question, in theory multiple processes could share the same same code segment. However, this is easier said than done because a process's code [segment] is usually loaded from multiple sources.