1
Q:

main()

{

fork();

 

printf(“Hello World!”);

}

Output for the above unix program is

A) Hello World! B) Hello World!Hello World!
C) Hello World D) None

Answer:   B) Hello World!Hello World!



Explanation:

The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process

Subject: Operating Systems
Exam Prep: GRE
Q:

What are the benefits of multithreaded programming?

Answer

 



  • Responsiveness

  • Resources sharing

  • Economy

  • Utilization of multiprocessor architectures.

Report Error

View answer Workspace Report Error Discuss

1 1625
Q:

What is cache-coherency?

Answer

In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches s called cache-coherency.

Report Error

View answer Workspace Report Error Discuss

1 1702
Q:

What are the different functions of Scheduler?

Answer

Scheduler deals with the problem of deciding which of the process in the ready queue is to be allocated the CPU. Short Term Schedulers, Long Term Schedulers

Report Error

View answer Workspace Report Error Discuss

1 1677
Q:

What is the difference between microkernel and macro kernel?

Answer

Micro-kernal : A micro-kernel is a minimal operating system that performs only the essential functions of an operating system. All other operating system functions are performed by system processes.


Monolithic : A monolithic operating system is one where all operating system code is in a single executable image and all operating system code runs in system mode.

Report Error

View answer Workspace Report Error Discuss

0 2971
Q:

What is a Safe State and what is its use in deadlock avoidance?

Answer

When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state. System is in safe state if there exists a safe sequence of all processes. Deadlock Avoidance : ensure that a system will never enter an unsafe state.

Report Error

View answer Workspace Report Error Discuss

0 3895
Q:

What is the difference between Compiler and Interpreter?

Answer

An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions.

Report Error

View answer Workspace Report Error Discuss

1 1607
Q:

What are deadlock prevention techniques?

Answer

Mutual exclusion


Hold and wait


No preemption


Circular wait

Report Error

View answer Workspace Report Error Discuss

0 1632
Q:

What is a data register and address register?

Answer

Data registers - can be assigned to a variety of functions by the programmer. They can be used with any machine instruction that performs operations on data.
Address registers - contain main memory addresses of data and instructions or they contain a portion of the address that is used in the calculation of the complete addresses.

Report Error

View answer Workspace Report Error Discuss

0 1636