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?
558 views Asked by Waqar Ul Khaf At
1
There are 1 answers
Related Questions in VIRTUAL-MEMORY
- about "preprocessing" in PintOS compiling(C programming), There are 2-questions for referencing headers and incomplete type error
- Why are pre-allocated stacks expensive, given 64-bit virtual memory?
- Using page-table remapping to avoid data-copying during array-reallocation
- Is there a better way in Linux to query a memory mapping than text parsing /proc/self/maps?
- Converting virtual address to real address - in hexadecimal
- Can AWS Sagemaker training instances swap virtual memory to disk?
- Is it possible to write at virtual 0x0 on a classical OS?
- How does a TLB manage memory translation for addresses that cross page boundaries?
- Using psutil.virtual_memory() to calculated the memory consumption of a module within a program
- Who and how generate the virtual/logical addresses? Confusion if it's the compiler, the linker, the loader
- Number of segments that can be in main memory at certain instant
- What is the difference Between 'Dirty Memory' and 'Dirty Size' in iOS VM Tracker?
- Allocate region of virtual address space upfront
- Assumptions about dwPageSize on different systems
- How is the physical address of the page table calculated from page directory
Related Questions in MEMORY-SEGMENTATION
- How does CPU addressing the next instruction immediately after switching into protection mode?
- SIGSEGV on x86/x64 due to conflict between raw memory access and DS register in C compiled with TCC as JIT engine on Linux
- Why does far call "call far ptr label" MASM syntax not work as intended?
- Wow64 subsystem and its implementation on x86_64
- x86 - Switching from 32-bit to 64-bit via RETF
- 8086 microprocessor memory doubts, is external, if so how does segmentation actually occur
- Does the CS register need to be set when setting up Unreal Mode?
- Segmentation Fault (Core Dumped) - Error when importing Rasterstats module
- Finding the memory address of fs:28h
- Why does `pop SS` need that RPL and DPL are equal to the CPL?
- Reading a segment register (%gs) which contains the pointer to a list
- MIPS behavior of consecutive jumps on segment boundary
- Location of stack and heap
- A2118: cannot have segment address references with TINY model
- Are segments supposed to overlap? With an empty data section CS and DS get the same value
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?
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)
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.