Searching for "%"

Q:

What is multi tasking, multi programming, multi threading?

Answer

Multi programming: Multiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating system selects a job from the job pool and starts executing a job, when that job needs to wait for any i/o operations the CPU is switched to another job. So the main idea here is that the CPU is never idle. 


Multi tasking: Multitasking is the logical extension of multiprogramming .The concept of multitasking is quite similar to multiprogramming but difference is that the switching between jobs occurs so frequently that the users can interact with each program while it is running. This concept is also known as time-sharing systems. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of time-shared system. 


Multi threading: An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tasks for example a web server accepts client requests for web pages, images, sound, and so forth. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request. To get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used.

Report Error

View answer Workspace Report Error Discuss

Q:

What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?

Answer

Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.


 


What_is_the_cause_of_thrashing_How_does_the_system_detect_thrashing_Once_it_detects_thrashing,_what_can_the_system_do_to_eliminate_this_problem1557490890.jpg image

Report Error

View answer Workspace Report Error Discuss

Q:

A bag contains 12 white and 18 black balls. Two balls are drawn in succession without replacement. What is the probability that first is white and second is black?

A) 6/145 B) 36/145
C) 18/95 D) 12/145
 
Answer & Explanation Answer: B) 36/145

Explanation:
 

The probability that first ball is white:
=C112C130=1230=25


Since, the ball is not replaced; hence the number of balls left in bag is 29.
Hence the probability the second ball is black:
=C118C129=1829


Required probability =(25)×(1829)


=36/145

Report Error

View Answer Report Error Discuss

Q:

What is the difference between Hard and Soft real-time systems?

Answer

A hard real-time system guarantees that critical tasks complete on time. This goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other tasks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded

Report Error

View answer Workspace Report Error Discuss

Q:

Four dice are thrown simultaneously. Find the probability that all of them show the same face.

A) 1/216 B) 1/36
C) 2/216 D) 4/216
 
Answer & Explanation Answer: A) 1/216

Explanation:

The total number of elementary events associated to the random experiments of throwing four dice simultaneously is:

 

6*6*6*6=64

 

n(S) = 64

 

Let X be the event that all dice show the same face. 

 

X = { (1,1,1,1,), (2,2,2,2), (3,3,3,3), (4,4,4,4), (5,5,5,5), (6,6,6,6)}

 

n(X) = 6

 

Hence required probability = n(X)n(S)=664 =1216

Report Error

View Answer Report Error Discuss

Filed Under: Probability

Q:

What resources are used when a thread is created? How do they differ from those when a process is created?

Answer

When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads.

Report Error

View answer Workspace Report Error Discuss

Q:

While running DOS on a PC, which command would be used to duplicate the entire diskette?

Answer

diskcopy

Report Error

View answer Workspace Report Error Discuss

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