Topic — Add New » Posts Last Poster Freshness
Number of child processes (while using fork() ) ?? 1 tj91 2 weeks

It was given 2^N-1

Please Explain!!

mutex and semaphore 3 deepa298 3 weeks

code snippet for mutex and semaphore?

Fork ..child and parent problem 9 divakarshukla 1 month

Consider the following code snippet...

if (fork() == 0)
{
    a = a + 5;
    printf("%d, %d \n", a, &a);
}
else
{
    a = a - 5;
    printf ("%d, %d \n", a,& a);
}

Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE? [ a ? b means that the relationship between a and b cannot be determined and will depend on whether child runs first or parent runs first or some other factors]

Vfork 3 sacrishi 1 month
volatile int a;

int main()
{
    a=10;
    volatile int *b=&a;
    volatile int c=11;
    if(vfork()==0)
    {
        a++;
        (*b)++;
        c++;
        printf("%d %d %d\n",a,*b,c);
        exit(0);
    }
    printf("%d %d %d\n",a,*b,c);
}

Assuming child process executes first
a) 12 12 12
12 12 12

b) 12 12 12
10 10 10

c) 10 10 10
10 10 10

d) None of these

whats the answer ....according ...

Vfork 1 sacrishi 1 month

volatile int a;

int main()
{
a=10;
volatile int *b=&a; volatile int c=11;
if(vfork()==0) {
a++; (*b)++; c++;
printf("%d %d %d\n",a,*b,c);
exit(0); }
printf("%d %d %d\n",a,*b,c);
}
Assuming child process executes first
a) 12 12 12 b) 12 12 12
12 12 12 10 10 10

c) 10 10 10 d) None of these
10 10 10

what...

virtual memory dependence 1 sacrishi 1 month

The size of Virtual Memory depends on the which of the following in Linux Operating System

a) Physical Memory b) Secondary Memory c)Both d) None of these

which option is correct and why???????

operating system 2 kartik 2 months

Why must be bitmap image for the file allocation be kept on mass storage rater then in main memory?

Operating System 1 ipsharry 2 months

Q Consider the following snapshot of a system running n processes. Process i is
holding i x instances of a resource R, 1 £ i £ n. currently, all instances of R are
occupied. Further, for all i, process i has placed a request for an additional
i y instances while holding the i x instances it already has. There are exactly two
processes p and q such that 0. p q y = y = Which one of the following can serve as
a necessary condition to guarantee that the system is n...

direct i intern problem 2 kartik 3 months

i is a gobal variable with value 5 and function v() is called in by three threads.

v()
{i++;
i--;

}

what is the no. of possible outcomes of i and what are they.

Data Structures Types 1 bharti 3 months

What is the difference between an ORDERED and UNORDERED data structure?

A GATE 2011 question about OS 8 lokesh 4 months

A thread is usually defined as a ‘light weight process’ because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the followings is TRUE?
(A) On per-thread basis, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) On per-thread basis, the OS does not maintain virtual memory state
(D) On per thread basis, the OS maintains only scheduling an...

Operating System 1 5 months

What must be the hit ratio in order to reduce the effective memory access time from 200ns to 140ns if tlb lookup time is 20ns

what is priority inversion in Operating Systems 2 Saurya 5 months

what is priority inversion in process scheduling?

UNIX preemptive ot not? 6 Santosh 6 months

What kind of operating system UNIX is? Preemptive or Non-Preemptive

Operating System 3 santosh 6 months

Consider we have 4 processes P1, P2, P3 and P4 and consider the following table. Consider a < b < c < d where a, b, c and d is the execution time of P1, P2, P3 and P4 respectively.

Processes Execution Time
P1 a
P2 b
P3 c
P4 d

What is the average turnaround time when shortest job first CPU scheduling algorithm is used? (AKAMAI 2010 Engg – Set 3 – Q10) (LOW)
A) (3a + 4b + c + d) / 4
B) (4a + 3b + 2c + d) / 4

What a.out file consiste of? 3 Rex 7 months

What is there inside the executable file ?

Process Synchronization Question 6 raj 8 months

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:

/* P1 */
while (true) {
  wants1 = true;
  while (wants2==true);
    /* Critical Section */
  wants1=false;
}
/* Remainder section */
/* P2 */
while (true) {
wants2 = true;
while (wants1==true);
/* Critical Section */
Wants2=false;
}
/* Remainder section */

Here, wants1 and wants2 are shared variables, which are initiali...