3i Infotech Papers: Sample Questions 795 - 796 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 795

» Basic CS » Data Structures

Essay Question▾

Describe in Detail

For the following COBOL code, draw the Binary tree?

01 STUDENT_REC.

02 NAME.

03 FIRST_NAME PIC X (10).

03 LAST_NAME PIC X (10).

02 YEAR_OF_STUDY.

03 FIRST_SEM PIC XX.

03 SECOND_SEM PIC XX.

Explanation

Binary tree of COBOL code

Binary Tree of COBOL Code

Binary tree of COBOL code

  • Root node with data = STUDENT_REC- All data elements are under STUDENT_REC

  • Data in the left subtree is: [NAME, FIRST NAME, LAST NAME] with NAME again broken into FIRSR NAME and LAST NAME.

  • Data in the right subtree is: [YEAR OF STUDY, FIRST SEM SECOND SEM] with YEAR OF STUDY having two components FIRST SEM and SECOND SEM.

Question number: 796

» Basic CS » Operating System

Essay Question▾

Describe in Detail

What is thrashing?

Explanation

Graph this indicate thrashing

Graph this Indicate Thrashing

Graph this indicate thrashing

  • Thrashing is little progress in a computer system because memory or other resources are either exhausted or limited to perform needed operations.

  • Caused in virtual memory schemes when the processor spends most of its time swapping pages- due to page faults.

  • It is caused when pages in memory refer other pages.

  • The large “working set” of active processes cannot be all accommodated in the real memory.

  • Virtual memory systems allows placing some pages on virtual memory- only bringing required page on demand into the RAM.

  • A thrashing system is either a very slow system might come to a halt.

  • Generally occurs when enough frames are not allocated to a process than are needed.

Two ways to prevent thrashing:

  • Instruct mid-term scheduler to swap out some of the process to recover from thrashing

  • Instructing the dispatcher not to load more processes after a threshold