Operating Systems Questions

Q:

What are demand-paging and pre-paging?

Answer

With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With pre-paging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.

Report Error

View answer Workspace Report Error Discuss

4 12073
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 & Explanation 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

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems
Exam Prep: GRE

1 12033
Q:

What are the disadvantages of context switching?

Answer

Time taken for switching from one process to other is pure over head. Because the system does no useful work while switching. So one of the solutions is to go for threading when ever possible.

Report Error

View answer Workspace Report Error Discuss

24 11632
Q:

A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games.Chess Bob's CLASSPATH is set (at login time) to: /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the Chess.class file?

 

A) /test/Chess.class B) /home/bob/Chess.class
C) /test/games/Chess.class D) /user/lib/games/Chess.class
 
Answer & Explanation Answer: D) /user/lib/games/Chess.class

Explanation:

/user/lib/games/Chess.class could be the possible location of the file

Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems

6 9140
Q:

The main interface in Windows and OS X is __________ interface.

A) Command-line B) Embedded
C) Neural D) Graphical
 
Answer & Explanation Answer: D) Graphical

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Operating Systems
Exam Prep: Bank Exams
Job Role: Analyst , Bank Clerk , IT Trainer

15 8372
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

8 8230
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 8002
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 7749