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:

Define latency, transfer and seek time with respect to disk I/O.

Answer

Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time.

Report Error

View answer Workspace Report Error Discuss

14 14392
Q:

What are local and global page replacements?

Answer

Local replacement means that an incoming page is brought in only to the relevant process address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only.

Report Error

View answer Workspace Report Error Discuss

4 7402
Q:

When does the condition 'rendezvous' arise?

Answer

In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered.

Report Error

View answer Workspace Report Error Discuss

12 6793
Q:

Explain the popular multiprocessor thread-scheduling strategies.

Answer

  1. Load Sharing: Processes are not assigned to a particular processor. A global queue of threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis.

  2. Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy.

  3. Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool.

  4. Dynamic scheduling: The number of thread in a program can be altered during the course of execution.

Report Error

View answer Workspace Report Error Discuss

9 8468
Q:

What is busy waiting?

Answer

The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.

Report Error

View answer Workspace Report Error Discuss

9 5550
Q:

What are the stipulations of C2 level security?

Answer

C2 level security provides for:


 


1.Discretionary Access Control


2.Identification and Authentication


3.Auditing


4.Resource reuse

Report Error

View answer Workspace Report Error Discuss

19 8158
Q:

What is cycle stealing?

Answer

We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle.

Report Error

View answer Workspace Report Error Discuss

0 1644
Q:

When is a system in safe state?

Answer

The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock.

Report Error

View answer Workspace Report Error Discuss

7 7895