edited by
1,008 views
4 votes
4 votes

Consider a situation, in which several people are executing copies of a mail program. Which of the following statements is/are not correct:

  1. All the users share one program counter and stack for mail program.
  2. All the users share the same execution sequence.
  3. All the users share same text section, but data section varies necessarily.
  1. I and II
  2. only I
  3. only II
  4. only III
edited by

2 Answers

Best answer
3 votes
3 votes

The mail program runs as different processes for different users, so there is no sharing of program counter and stack. Each user has his own program counter and stack. This statement is false.

The execution sequence must be different for the users because each user may be doing a different task like one doing mail composing while other clearing the Thrash. This statement is False.

The statement 3 is correct because it is the same program making the text section the same. Data section gets populated by the data of a particular user and need not be same as that of another.

edited by
0 votes
0 votes

Even if two processes are associated with the same program, they're not considered the same process.

  • The execution sequence is considered different.
    (one process might take the branch, other might not etc)
     
  • The heap section is considered different.
    (obviously different pieces of memory from heap allocated)
     
  • The stack section is considered different.
    (different activation records could be pushed on stack)
     
  • The data section is considered different.
    (static and global variables probably get assigned different values depending on dynamic factors)
     
  • Only the text section is considered same.
    (Text section has the programmed code. It'll be same for different processes of the same program)

Option A


Please do your own research on what a process and a program exactly is. (Hint: One is active, other is passive)

Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Dec 26, 2016
281 views
Consider the following 3 processes with 3 binary semaphores with initial values $S_{0}=0, S_{1}=0, S_{2}=1$$$ \begin{array}{|c|c|c|} \hline \textbf{P} & \textbf{Q} & \tex...
2 votes
2 votes
3 answers
2
Bikram asked Dec 26, 2016
1,109 views
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
1 votes
1 votes
1 answer
4
Bikram asked Dec 26, 2016
215 views
A counting semaphore is initialized to $10$. The $6$ P(wait) operations and $4$ V(signal) operations were completed in this semaphore. The resulting value of semaphore is...