Computer Basics

Description: This test consists of 20 questions about the basics of computer like data structure, database, operating system and computer languages etc.
Number of Questions: 20
Created by:
Tags: gate database os Computer Basics
Attempted 0/20 Correct 0 Score 0

Which of the following necessary and sufficient condition of deadlock shows that the resources are used in the processes must be non-sharable?

  1. Hold and wait

  2. Mutual exclusion

  3. Non-preemptive

  4. Circular wait

  5. None of these


Correct Option: B
Explanation:

This condition determines that there must be at least one unsharable resource so that the processes claim exclusive control of resources they need.

Which of the following services is not provided by the operating system?

  1. Resource allocation

  2. I/O operations

  3. Error detection

  4. Communication

  5. None of these


Correct Option: E
Explanation:

All the above services are provided by an OS.

Which of the following CPU scheduling algorithms can be preemptive as well as non-preemptive?

  1. Shortest Job First (SJF)

  2. First Come First Serve (FCFS)

  3. Round Robin

  4. Both (1) and (3)

  5. None of these


Correct Option: A
Explanation:

SJF is a non-preemptive as well as preemptive. In preemptive SJF, the process with smallest run time is run next. In non-preemptive SJF, the process with the smallest amount of time remaining until completion is selected to execute. Non-preemptive SJF is also called SRTF( Shortest Remaining Time First).

Which of the following statements is/are false?

  1. Processes are heavy weight.

  2. Process switching needs to interact with the operating system.

  3. Thread switching needs to interact with the operating system.

  4. Both (2) and (3)

  5. None of these


Correct Option: C
Explanation:

A thread is a lightweight process and multiple threads can exit within the same process so there is no need to manage the resources by the operating system as compared to process switching, hence thread switching does not need the operating system interaction.

Which of the following is/are called program threats in operating system?

  1. Trojan horse

  2. Virus

  3. Worm

  4. All of the above

  5. Only (1) and (2)


Correct Option: E
Explanation:

Yes, only (1) and (2) are examples of program threats.

Which of the following is/are the disadvantage(s) of the time-sharing operating systems?

  1. It reduces CPU idle time.

  2. Multi-channel conversation.

  3. Integrity and security of the data is very less.

  4. All of the above

  5. None of the above


Correct Option: C
Explanation:

There is no security and integrity of the data as the operating system can not easily find the appropriate data to allocate the particular resource as the response time is only a few seconds. So it is a disadvantage of it.

Which of the following is the task of spooling in operating system?

  1. It is the process in which the data is stored in the buffers while the data is transferred between the two devices and an application.

  2. It is the process in which two peripheral devices such as hard disk and magnetic tape or hard disk and CD- ROM etc. accesses the data directly and utilizes the main memory for temporary storage of the data. Spooling is done with the help of spool programs.

  3. It is the process in which the CPU can execute multiple tasks simultaneously by switching the process.

  4. It is the property in which a processor can share two or more process simultaneously.

  5. None of the above


Correct Option: B
Explanation:

This statement shows the property of spooling in the operating system. In this process the operating system can do other tasks with the computational task.

Which of the following is/are non-linear data structures?

  1. Arrays

  2. Queues

  3. Binary search trees

  4. Stacks

  5. Both (3) and (4)


Correct Option: C
Explanation:

In binary search tree, the elements are not in a linear list , they have hierarchical structure so it is a non-linear data structure.

Which of the following is not a reserved word in C++ language?

  1. typedef

  2. unsigned

  3. union

  4. mutable

  5. none of the above


Correct Option: E
Explanation:

All of the above are keywords in C++.

Which of the following layers in OSI model provides congestion control in networking?

  1. Network layer

  2. Physical layer

  3. Application layer

  4. Session layer

  5. None of the above


Correct Option: A
Explanation:

Yes, this layer is responsible to provide congestion control as the routers receive the packet faster than they forward them so this layer can discard the queued packets to make a room for the arriving packets.

Which of the following is an example of a single user computer system?

  1. Workstation

  2. Mini computer

  3. Mainframe computer

  4. All of the above

  5. Both (1) and (2)


Correct Option: A
Explanation:

It is an example of a single user computer system and has more powerful microprocessor as compared to the personnel computer.

Which of the following database transactions ensures that the effect of the transaction will persist despite of system crashes or power loss, if the transaction is committed?

  1. Atomicity

  2. Consistency

  3. Isolation

  4. Durability

  5. None of the above


Correct Option: D
Explanation:

It ensures that the if the transaction fails due to the power failure or system crash, then its effect will remain in the system.

Which of the following SQL (Structured Query Language) commands is used to remove the table structure form the database?

  1. Drop

  2. Delete

  3. Truncate

  4. Both (1) and (3)

  5. None of the above


Correct Option: A
Explanation:

Yes, by using drop command we can remove an object from the database and if we want to drop a table then all the table structure will be removed form the database and we can not get back it.

Which of the following statements is/are not true?

  1. Intranet uses the internet protocols.

  2. Intranet is restricted as compared to internet.

  3. Intranet is less safe as compared to internet.

  4. All of the above

  5. None of these


Correct Option: C
Explanation:

No, internet is less safe as compared to intranet as intranet is accessible only for the specific users and internet is accessible widely so there may be less safety in using internet as different types of cyber attacks or threats may harm to the system while using the internet.

Which of the following is/are true statement(s)?

  1. Indexes are used to retrieve the rows of the database table quickly.

  2. Indexes are not useful for the tables having less data.

  3. The check constraints in SQL defines the business rules that should be follow by all the rows of the database.

  4. Both (1) and (3) are true.

  5. All (1), (2) and (3) are true.


Correct Option: E
Explanation:

Yes, all the three statements are true.

Which of the following SQL clauses is used to place a condition while arranging identical data into a group?

  1. Group By clause

  2. Having clause

  3. Distinct clause

  4. Like clause

  5. None of the above


Correct Option: B
Explanation:

Yes, by using Having clause, we can make a condition on the data, which are retrieved by the Group By clause.

Which of the following commands in transaction control in SQL is used to save the changes in the database by the transaction?

  1. SAVEPOINT

  2. COMMIT

  3. SET TRANSACTION

  4. ROLLBACK

  5. None of the above


Correct Option: B
Explanation:

Yes, this transaction command is used to save the work that is performed by the transaction on the database.

Which of the following is not related to stack data structure?

  1. LIFO

  2. Push and pop

  3. Front and rear

  4. Both (1) and (3)

  5. None of these


Correct Option: C
Explanation:

These terms are not related to the stack data structure . Front and rear are the terms related to queue data structure, in which all the insertion are performed only at one end, called rear and all the deletion are performed at one end, called front end.

Which of the following statements is false?

  1. Array is a collection of homogeneous elements.

  2. Quick sort is based on the divide and conquer method.

  3. Array is an index based data structure.

  4. The worst case complexity of quick sort is O(n^2).

  5. None of the above


Correct Option: E
Explanation:

This is the correct choice as all the above statements are true.

Which of the following statements is/are true?

  1. Static data structures have a fixed size.

  2. Insertion/deletion occurs fast in static data structure.

  3. Stack is a dynamic data structure.

  4. All of the above

  5. Only (1) and (3) are true.


Correct Option: E
Explanation:

Yes, both the options are true.

- Hide questions