Searching for "he"

Q:

What are the typical elements of a process image?

Answer

User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified.


User program: The instructions to be executed.


System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls.


Process control Block (PCB): Info needed by the OS to control processes.

Report Error

View answer Workspace Report Error Discuss

Q:

What are short, long and medium-term scheduling?

Answer

Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process.


Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria.


Short term scheduler, also know as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption.

Report Error

View answer Workspace Report Error Discuss

Q:

Explain the concept of Reentrancy?

Answer

It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.


Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

Report Error

View answer Workspace Report Error Discuss

Q:

What is the probability of getting 53 Mondays in a leap year?

A) 1/7 B) 3/7
C) 2/7 D) 1
 
Answer & Explanation Answer: C) 2/7

Explanation:

1 year = 365 days . A leap year has 366 days

A year has 52 weeks. Hence there will be 52 Sundays for sure.

52 weeks = 52 x 7 = 364days

366 – 364 = 2 days

In a leap year there will be 52 Sundays and 2 days will be left.

These 2 days can be:

1. Sunday, Monday

2. Monday, Tuesday

3. Tuesday, Wednesday

4. Wednesday, Thursday

5. Thursday, Friday

6. Friday, Saturday

7. Saturday, Sunday

Of these total 7 outcomes, the favourable outcomes are 2.

Hence the probability of getting 53 days = 2/7

Report Error

View Answer Report Error Discuss

Filed Under: Probability

Q:

Find the probability that it is either white or red ball when,one ball is drawn at random in a bag that contains 3 black,4 white and 5 red balls

A) 0.5 B) 0.75
C) 0.25 D) 0.8
 
Answer & Explanation Answer: B) 0.75

Explanation:

P(red ball) = 5/12

P(white ball) = 4/12

P(red or white ball) = 5/12 + 4/12 = 3/4 = 0.75

Report Error

View Answer Report Error Discuss

Filed Under: Probability

Q:

A bag contains 3 black, 4 white and 5 red balls. One ball is drawn at random. Find the probability that it is either black or red ball:

A) 2/3 B) 1/4
C) 5/12 D) 1/2
 
Answer & Explanation Answer: A) 2/3

Explanation:

P(black ball)=3/12

P(red ball)=5/12

P(black or red)=3/12+5/12=2/3

Report Error

View Answer Report Error Discuss

Filed Under: Probability

Q:

From well shuffled standard pack of 52 playing cards,one card is drawn. What is the probability that it is either a red card or black card?

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

Explanation:

P(red cards)=26/52

P(black cards)=26/52

P(red or black cards)=26/52+26/52=1

Report Error

View Answer Report Error Discuss

Filed Under: Probability

Q:

What is the probability that it is either a heart card or diamond card, when a card is drawn from a well shuffled standard pack of 52 playing cards?

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

Explanation:

P(heart cards)=13/52

P(diamond cards)=13/52

P(heart or diamond)=13/52+13/52=1/2

Report Error

View Answer Report Error Discuss

Filed Under: Probability