Basic CS-Operating System [3i Infotech Placement]: Sample Questions 4 - 6 of 89

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 4

Operating System

Write in Short

Short Answer▾

What is the precedence order from high to low, of the symbols

Explanation

  • When two operators share an operand the operator with the higher precedence goes first.
  • is treated as ,
  • is treated as since multiplication has a higher precedence than addition.
  • Symbols arranged in precedence order are.

Question 5

Operating System
Edit

Write in Short

Short Answer▾

Can there be at least some solution to determine the number of arguments passes to a variable argument list function?

Explanation

  • Yes, it can be done using a control parameter before the variable argument list that determines how many argument will follow.
  • The printf () function uses a string parameter as the control parameter.
  • The number of escape sequence in the string determines the number of argument that are expected to follow, each escape sequence in the string is expanded from left to right according to the arguments that follow.
  • A similar approach can be used to pass the number of arguments that will follow a named argument.

Question 6

Operating System
Edit

Describe in Detail

Essay▾

What is page cannibalizing?

Explanation

  • Page cannibalizing is page swapping and page replacement so that the page in use by the same process in the current working set is forced to be replaced by another page. This would result in poor performance.

Page swapping:

  • Enables CPU to execute program and manipulate data files larger than main memory through virtual memory.
  • Data in nearest working set is put into main memory and the rest is put on the disk.
  • Swapping exchanges a portion of data in main memory with a portion of data on the disk.
  • Old pages not accessed in recent past are good candidates for swapping.

    Page replacement:

  • Algorithm to decide the page, which needs to be replaced when new page comes in.
  • When a requested page is not in memory and a free page cannot be used to satisfy the allocation the number of free page is lower.
  • When the page was selected for replacement and paged out is referenced again paged in and waiting for I/O completion.
  • A new page is referred and not present in memory, page fault occur and replace page with newly needed page.

Developed by: