Tuesday, September 22, 2020

Database Systems MCQ

 Q.1 Which of the following relational algebraic operations is not from set theory?

(A) Union

(B) Intersection

(C) Cartesian Product

(D) Select

Ans: (D)

 

Q.2 Which of the following ensures the atomicity of the transaction?

(A) Transaction management component of DBMS

(B) Application Programmer

(C) Concurrency control component of DBMS

(D) Recovery management component of DBMS

Ans: (A)

 

Q.3 If both the functional dependencies : X->Y and Y->X hold for two attributes X and Y then the relationship between X and Y is

(A) M:N

(B) M:1

(C) 1:1

(D) 1:M

Ans: (C)

 

Q.4 What will be the number of columns and rows respectively obtained for the operation, AB, if A B are Base union compatible and all the rows of a are common to B? Assume A has 4 columns and 10 rows; and B has 4 columns and 15 rows

(A) 4,0

(B) 0,0

(C) 4,5

(D) 8,5

Ans: (A)

 

Q.5 For correct behaviour during recovery, undo and redo operation must be

(A) Commutative

(B) Associative

(C) idempotent

(D) distributive

Ans: (C)

 

Q.6 Which of the following is not a consequence of non-normalized database?

(A) Update Anomaly

(B) Insertion Anomaly

(C) Redundancy

(D) Lost update problem

Ans: (D)

 

Q.7 Which of the following is true for relational calculus?

(A) "x(P(x))º¬($x)(¬P(x)) 

(B) "x(P(x))º¬($x)(P(x))

(C) "x(P(x))º($x)(¬P(x)) 

(D) "x(P(x))º($x)(P(x))

Ans: (A)


Q.8 The part of a database management system which ensures that the data remains in a consistent state is

(A) authorization and integrity manager

(B) buffer manager

(C) transaction manager

(D) file manager

Ans: (C)

 

Q.9 Relationships among relationships can be represented in an-E-R model using

(A) Aggregation

(B) Association

(C) Weak entity sets

(D) Weak relationship sets

Ans: (A)

 

Q.10 In tuple relational calculus P1 AND P2 is equivalent to

(A) (¬P1OR¬P2).

(B) ¬(P1OR¬P2).

(C) ¬(¬P1OR P2).

(D) ¬(¬P1OR ¬P2).

Ans: (D)

 

Q.11 If α->β holds then so does

(A) ϒα->ϒβ

(B) α->ϒβ

(C) both (A) and (B)

(D) None of the above

Ans: (A)

 

Q.12 Cascading rollback is avoided in all protocol except

(A) strict two-phase locking protocol.

(B) tree locking protocol

(C) two-phase locking protocol

(D) validation based protocol.

Ans: (D)

 

Q.13 Wait-for graph is used for

(A) detecting view serializability.

(B) detecting conflict serializability.

(C) deadlock prevention

(D) deadlock detection

Ans: (D)

 

Q.14 The expression sq1(E1 |X|q2E2) is the same as

(A) E1 |X|q1^ q2E2 (B) sq1 E1^sq2 E2

(C) E1 |X|q1 q2E2 (D) None of the above

Ans: (A)

 

Q.15 The clause alter table in SQL can be used to

(A) add an attribute

(B) delete an attribute

(C) alter the default values of an attribute

(D) all of the above

Ans: (D)

 

Q. 16 The data models defined by ANSI/SPARC architecture are

(A) Conceptual, physical and internal

(B) Conceptual, view and external

(C) Logical, physical and internal

(D) Logical, physical and view

Ans: (D)

 

Q.17 Whenever two independent one-to-many relationships are mixed in the same relation, a _______ arises.

(A) Functional dependency

(B) Multi-valued dependency

(C) Transitive dependency

(D) Partial dependency

Ans:(B)

 

Q.18 A table can have only one

(A) Secondary key

(B) Alternate key

(C) Unique key

(D) Primary key

Ans: (D)

 

Q.19 Dependency preservation is not guaranteed in

(A) BCNF

(B) 3NF

(C) PJNF

(D) DKNF

Ans: (A)

 

Q.20 Which is the best file organization when data is frequently added or deleted from a file?

(A) Sequential

(B) Direct

(C) Index sequential

(D) None of the above

Ans: (B)

 

Q.21 Which of the following constitutes a basic set of operations for manipulating relational data?

(A) Predicate calculus

(B) Relational calculus

(C) Relational algebra

(D) SQL

Ans: (C)

 

Q.22 An advantage of views is

(A) Data security

(B) Derived columns

(C) Hiding of complex queries

(D) All of the above

Ans: (A)

 

Q.23 Which of the following is not a recovery technique?

(A) Deferred update

(B) Immediate update

(C) Two-phase commit

(D) Shadow paging

Ans: (C)

 

Q.24 Isolation of the transactions is ensured by

(A) Transaction management

(B) Application programmer

(C) Concurrency control

(D) Recovery management

Ans: (C)

 

Q.25 _______ operator is used to compare a value to a list of literals values that have been specified.

(A) Like

(B) COMPARE

(C) BETWEEN

(D) IN

Ans: (A)

Monday, September 21, 2020

Database Systems MCQ

 Q.1 The cost of reading and writing temporary files while evaluating a query can be reduced by

(A) building indices 

(B) pipelining

(C) join ordering 

(D) none of the above

Ans: (B)


Q.2 A transaction is in __________ state after the final statement has been executed.

(A) partially committed 

(B) active

(C) committed 

(D) none of the above

Ans: (C)


Q.3 In multiple granularity of locks SIX lock is compatible with

(A) IX 

(B) IS

(C) S 

(D) SIX

Ans: (B)


Q.4 The statement that is executed automatically by the system as a side effect of the modification of the database is

(A) backup 

(B) assertion

(C) recovery 

(D) trigger

Ans: (D)


Q.5 The normal form that is not necessarily dependency preserving is

(A) 2NF 

(B) 3NF

(C) BCNF 

(D) 4NF

Ans: (A)


Q.6 A functional dependency of the form x -> y is trivial if

(A) y Í x 

(B) y Ì x

(C) x Í y 

(D) x Ì y

Ans: (A)


Q.7 The normalization was first proposed by ______________.

(A) Code 

(B) Codd

(C) Boyce Codd 

(D) Boyce

Ans: (B)


Q.8 The division operator divides a dividend A of degree m+n by a divisor relation B of

degree n and produces a result of degree

(A) m – 1 

(B) m + 1

(C) m * m 

(D) m

Ans: (D)


Q.9 Which of the following is not a characteristic of a relational database model?

(A) Table 

(B) Tree like structure

(C) Complex logical relationship 

(D) Records

Ans: (B)


Q.10 Assume transaction A holds a shared lock R. If transaction B also requests for a shared lock on R.

(A) It will result in a deadlock situation.

(B) It will immediately be rejected.

(C) It will immediately be granted.

(D) It will be granted as soon as it is released by A .

Ans: (C)


Q.11 In E-R Diagram total participation is represented by

(A) double lines 

(B) Dashed lines

(C) single line 

(D) Triangle

Ans: (A)


Q.12 The FD A -> B , DB -> C implies

(A) DA -> C 

(B) A -> C

(C) B -> A 

(D) DB -> A

Ans: (A)


Q.13 The graphical representation of a query is ________.

(A) B-Tree 

(B) graph

(C) Query Tree 

(D) directed graph

Ans: (C)


Q.14 Union operator is a :

(A) Unary Operator 

(B) Ternary Operator

(C) Binary Operator 

(D) Not an operator

Ans: (C)


Q.15 Relations produced from an E-R model will always be

(A) First normal form. 

(B) Second normal form.

(C) Third normal form. 

(D) Fourth normal form.

Ans: (A)


Q.16 Manager salary details are hidden from the employee .This is

(A) Conceptual level data hiding.

(B) External level data hiding.

(C) Physical level data hiding.

(D) None of these.

Ans: (A)


Q.17 Which of the following is true for network structure?

(A) It is a physical representation of the data.

(B) It allows many to many relationship.

(C) It is conceptually simple.

(D) It will be the dominant database of the future.

Ans: (A)


Q.18 Which two files are used during operation of the DBMS?

(A) Query languages and utilities

(B) DML and query language

(C) Data dictionary and transaction log

(D) Data dictionary and query language

Ans: (C )


Q.19 A list consists of last names, first names, addresses and pin codes. If all people in the list have the same last name and same pin code a useful key would be

(A) the pin code

(B) the last name

(C) the compound key first name and last name

(D) Tr from next page

Ans: (C )


Q.20 In b-tree the number of keys in each node is ____ than the number of its children.

(A) one less 

(B) same

(C) one more 

(D) half

Ans: (A)


Q.21 The drawback of shadow paging technique are

(A) Commit overhead 

(B) Data fragmentation

(C) Garbage collection 

(D) All of these

Ans: (D)


Q.22 Which normal form is considered adequate for normal relational database design?

(A) 2NF 

(B) 5NF

(C) 4NF 

(D) 3NF

Ans: (D)


Q.23 Which of the following addressing modes permits relocation without any change over in the code?

(A) Indirect addressing 

(B) Indexed addressing

(C) PC relative addressing 

(D) Base register addressing

Ans: (B)


Q.24 In a multi-user database, if two users wish to update the same record at the same time, they are prevented from doing so by

(A) jamming 

(B) password

(C) documentation 

(D) record lock

Ans: (D)


Q.25 The values of the attribute describes a particular_____________

(A) Entity set 

(B) File

(C) Entity instance 

(D) Organization

Ans: (C)

Saturday, September 19, 2020

Database Systems MCQ

 Q.1 When R∩S = Ф , then the cost of computing R|><|S is

(A) the same as R × S

(B) greater the R × S

(C) less than R × S

(D) cannot say anything

Ans: (A)

 

Q.2 In SQL the word ‘natural’ can be used with

(A) inner join

(B) full outer join

(C) right outer join

(D) all of the above

Ans: (A)

 

Q.3 The default level of consistency in SQL is

(A) repeatable read

(B) read committed

(C) read uncommitted

(D) serializable

Ans: (D)

 

Q.4 If a transaction T has obtained an exclusive lock on item Q, then T can

(A) read Q

(B) write Q

(C) both read and write Q

(D) write Q but not read Q

Ans: (C)

 

Q.5 Shadow paging has

(A) no redo

(B) no undo

(C) redo but no undo

(D) neither redo nor undo

Ans: (A)

 

Q.6 If the closure of an attribute set is the entire relation then the attribute set is a

(A) superkey

(B) candidate key

(C) primary key

(D) not a key

Ans: (A)

 

Q.7 DROP is a ______________ statement in SQL.

(A) Query

(B) Embedded SQL

(C) DDL

(D) DCL

Ans: (C)

 

Q.8 If two relations R and S are joined, then the non matching tuples of both R and S are ignored in

(A) left outer join

(B) right outer join

(C) full outer join

(D) inner join

Ans: (D)

 

Q.9 The keyword to eliminate duplicate rows from the query result in SQL is

(A) DISTINCT

(B) NO DUPLICATE

(C) UNIQUE

(D) None of the above

Ans: (C)

 

Q.10 In 2NF

(A) No functional dependencies (FDs) exist.

(B) No multivalued dependencies (MVDs) exist.

(C) No partial FDs exist.

(D) No partial MVDs exist.

Ans: (C)

 

Q.11 Which one is correct statement?

Logical data independence provides following without changing application programs:

(i) Changes in access methods.

(ii) Adding new entities in database

(iii) Splitting an existing record into two or more records

(iv) Changing storage medium

(A) (i) and (ii) (B) (iv) only, (C) (i) and (iv) (D) (ii) and (iii)

Ans: (D)

 

Q.12 In an E-R, Y is the dominant entity and X is a subordinate entity. Then which of the following is incorrect :

(A) Operationally, if Y is deleted, so is X

(B) existence is dependent on Y.

(C) Operationally, if X is deleted, so is Y.

(D) Operationally, if X is deleted, & remains the same.

Ans: (C)

 

Q.13 Relational Algebra is

(A) Data Definition Language .

(B) Meta Language

(C) Procedural query Language

(D) None of the above

Ans: (C)

 

Q.14 Which of the following aggregate functions does not ignore nulls in its results?.

(A) COUNT .

(B) COUNT (*)

(C) MAX

(D) MIN

Ans: (B)

 

Q.15 R (A,B,C,D) is a relation. Which of the following does not have a lossless join dependency preserving BCNF decomposition

(A) A->B, B->CD

(B) A->B, B->C, C->D .

(C) AB->C, C->AD

(D) A->BCD

Ans: (D)

 

Q.16 Consider the join of relation R with a relation S. If R has m tuples and S has n tuples, then the maximum and minimum size of the join respectively are

(A) m+n and 0

(B) m+n and |m-n|

(C) mn and 0

(D) mn and m+n

Ans: (C)

 

Q.17 Maximum height of a B+ tree of order m with n key values is

(A) Logm(n)

(B) (m+n)/2

(C) Logm/2(m+n)

(D) None of these

Ans: (D)

 

Q.18 Which one is true statement :

(A) With finer degree of granularity of locking a high degree of concurrency is possible.

(B) Locking prevents non – serializable schedules.

(C) Locking cannot take place at field level.

(D) An exclusive lock on data item X is granted even if a shared lock is already held on X.

Ans: (A)

 

Q.19 Which of the following statement on the view concept in SQL is invalid?

(A) All views are not updateable

(B) The views may be referenced in an SQL statement whenever tables are referenced.

(C) The views are instantiated at the time they are referenced and not when they are defined.

(D) The definition of a view should not have GROUP BY clause in it.

Ans: (D)

 

Q.20 Which of the following concurrency control schemes is not based on the serializability property?

(A) Two – phase locking

(B) Graph-based locking

(C) Time-stamp based locking

(D) None of these

Ans: (D)

 

Q.21 Which of the following is a reason to model data?

(A) Understand each user’s perspective of data

(B) Understand the data itself irrespective of the physical representation

(C) Understand the use of data across application areas

(D) All of the above

Ans: (D)

 

Q.22 If an entity can belong to only one lower level entity then the constraint is

(A) disjoint

(B) partial

(C) overlapping

(D) single

Ans: (B)

 

Q.23 The common column is eliminated in

(A) theta join

(B) outer join

(C) natural join

(D) composed join

Ans: (C )

 

Q.24 In SQL, testing whether a subquery is empty is done using

(A) DISTINCT

(B) UNIQUE

(C) NULL

(D) EXISTS

Ans: (D)

 

Q.25 Use of UNIQUE while defining an attribute of a table in SQL means that the attribute

values are

(A) distinct values

(B) cannot have NULL

(C) both (A) & (B)

(D) same as primary key

Ans: (C)

Friday, September 18, 2020

Database Systems MCQ

 Q.1 Which of the following relational algebra operations do not require the participating tables to be union-compatible?

(A) Union 

(B) Intersection

(C) Difference 

(D) Join

Ans: (D)


Q.2 Which of the following is not a property of transactions?

(A) Atomicity 

(B) Concurrency

(C) Isolation 

(D) Durability

Ans: (B)


Q.3 Relational Algebra does not have

(A) Selection operator. 

(B) Projection operator.

(C) Aggregation operators. 

(D) Division operator.

Ans: (C)


Q.4 Checkpoints are a part of

(A) Recovery measures. 

(B) Security measures.

(C) Concurrency measures. 

(D) Authorization measures.

Ans: (A)


Q.5 Tree structures are used to store data in

(A) Network model. 

(B) Relational model.

(C) Hierarchical model. 

(D) File based system.

Ans: (C)


Q.6 The language that requires a user to specify the data to be retrieved without specifying exactly how to get it is

(A) Procedural DML. 

(B) Non-Procedural DML.

(C) Procedural DDL. 

(D) Non-Procedural DDL.

Ans: (B)


Q.7 Precedence graphs help to find a

(A) Serializable schedule. 

(B) Recoverable schedule.

(C) Deadlock free schedule. 

(D) Cascadeless schedule.

Ans: (A)


Q.8 The rule that a value of a foreign key must appear as a value of some specific table is called a

(A) Referential constraint. 

(B) Index.

(C) Integrity constraint. 

(D) Functional dependency.

Ans: (A) The rule that a value of a foreign key must appear as a value of some specific table is called a referential constraint. (Referential integrity constraint is concerned with foreign key)


Q.9 The clause in SQL that specifies that the query result should be sorted in ascending or descending order based on the values of one or more columns is

(A) View 

(B) Order by

(C) Group by 

(D) Having

Ans: (B) The clause in SQL that specifies that the query result should be sorted in ascending or descending order based on the values of one or more columns is ORDER BY. (ORDER BY clause is used to arrange the result of the SELECT statement)


Q.10 What is a disjoint less constraint?

(A) It requires that an entity belongs to no more than one level entity set.

(B) The same entity may belong to more than one level.

(C) The database must contain an unmatched foreign key value.

(D) An entity can be joined with another entity in the same level entity set.

Ans: (A) Disjoint less constraint requires that an entity belongs to no more than one level entity set. (Disjoint less constraint means that an entity can be a member of at most one of the subclasses of the specialization.)


Q.11 According to the levels of abstraction, the schema at the intermediate level is called

(A) Logical schema. 

(B) Physical schema.

(C) Subschema. 

(D) Super schema.

Ans: According to the levels of abstraction, the schema at the intermediate level is called conceptual schema. (Note: All the options given in the question are wrong.)


Q.12 It is an abstraction through which relationships are treated as higher level entities

(A) Generalization. 

(B) Specialization.

(C) Aggregation. 

(D) Inheritance.

Ans: (C ) It is an abstraction through which relationships are treated as higher level entities Aggregation. (In ER diagram, aggregation is used to represent a relationship as an entity set.)


Q.13 A relation is in ____________ if an attribute of a composite key is dependent on an attribute of other composite key.

(A) 2NF 

(B) 3NF

(C) BCNF 

(D) 1NF

Ans: (B) A relation is in 3 NF if an attribute of a composite key is dependent on an attribute of other composite key. (If an attribute of a composite key is dependent on an attribute of other composite key then the relation is not in BCNF, hence it has to be decomposed.)


Q.14 What is data integrity?

(A) It is the data contained in database that is non redundant.

(B) It is the data contained in database that is accurate and consistent.

(C) It is the data contained in database that is secured.

(D) It is the data contained in database that is shared.

Ans: (B) (Data integrity means that the data must be valid according to the given constraints. Therefore, the data is accurate and consistent.)


Q.15 What are the desirable properties of a decomposition

(A) Partition constraint. 

(B) Dependency preservation.

(C) Redundancy. 

(D) Security.

Ans: (B) What are the desirable properties of a decomposition – dependency preserving. (Lossless join and dependency preserving are the two goals of the decomposition.)


Q.16 In an E-R diagram double lines indicate

(A) Total participation. 

(B) Multiple participation.

(C) Cardinality N. 

(D) None of the above.

Ans: (A)


Q.17 The operation which is not considered a basic operation of relational algebra is

(A) Join. 

(B) Selection.

(C) Union. 

(D) Cross product.

Ans: (A)


Q.18 Fifth Normal form is concerned with

(A) Functional dependency. 

(B) Multivalued dependency.

(C) Join dependency. 

(D) Domain-key.

Ans: (C)


Q.19 Block-interleaved distributed parity is RAID level

(A) 2. 

(B) 3

(C) 4. 

(D) 5.

Ans: (D)


Q.20 Immediate database modification technique uses

(A) Both undo and redo. 

(B) Undo but no redo.

(C) Redo but no undo. 

(D) Neither undo nor redo.

Ans: (A)


Q.21 In SQL the statement select * from R, S is equivalent to

(A) Select * from R natural join S. 

(B) Select * from R cross join S.

(C) Select * from R union join S. 

(D) Select * from R inner join S.

Ans: (B)


Q.22 Which of the following is not a consequence of concurrent operations?

(A) Lost update problem. 

(B) Update anomaly.

(C) Unrepeatable read. 

(D) Dirty read.

Ans: (B)


Q.23 As per equivalence rules for query transformation, selection operation distributes over

(A) Union. 

(B) Intersection.

(C) Set difference. 

(D) All of the above.

Ans: (D)


Q.24 The metadata is created by the

(A) DML compiler 

(B) DML pre-processor

(C) DDL interpreter 

(D) Query interpreter

Ans: (C)


Q.25 When an E-R diagram is mapped to tables, the representation is redundant for

(A) weak entity sets 

(B) weak relationship sets

(C) strong entity sets 

(D) strong relationship sets

Ans: (B)

Wednesday, September 16, 2020

Operating System MCQ

 Q.1 The field that contains a segment index or an internal index is called

(A) target datum 

(B) target offset

(C) segment field 

(D) fix dat

Ans: (A)


Q.2 A program in execution is called

(A) process 

(B) function

(C) CPU 

(D) Memory

Ans: (A)


Q.3 Jobs which are admitted to the system for processing is called

(A) long-term scheduling 

(B) short-term scheduling

(C) medium-term scheduling 

(D) queuing

Ans: (A)


Q.4 A set of techniques that allow to execute a program which is not entirely in memory is called

(A) demand paging 

(B) virtual memory

(C) auxiliary memory 

(D) secondary memory

Ans: (B)


Q.5 SSTF stands for

(A) Shortest-Seek-time-first scheduling 

(B) small – small-time-first

(C) simple-seek-time-first 

(D) small-simple-time-first scheduling

Ans: (A)


Q.6 Before proceeding with its execution, each process must acquire all the resources it needs is called

(A) hold and wait 

(B) No pre-emption

(C) circular wait 

(D) starvation

Ans: (A)


Q.7 Virtual memory is

(A) simple to implement

(B) used in all major commercial operating systems

(C) less efficient in utilization of memory

(D) useful when fast I/O devices are not available

Ans: (B)


Q.8 Relocation bits used by relocating loader are specified by

(A) Relocating loader itself 

(B) Assembler or Translator

(C) Macro processor 

(D) Both (A) and (B)

Ans: (B)


Q.9 Resolution of externally defined symbols is performed by

(A) Linker 

(B) Loader

(C) Compiler 

(D) Editor

Ans: (A)


Q.10 Relocatable programs

(A) cannot be used with fixed partitions

(B) can be loaded almost anywhere in memory

(C) do not need a linker

(D) can be loaded only at one specific location

Ans: (B)


Q.11 Page stealing

(A) is a sign of efficient system

(B) is taking page frames other working sets

(C) should be the tuning goal

(D) is taking larger disk spaces for pages paged out

Ans: (B)


Q.12 The total time to prepare a disk drive mechanism for a block of data to be read from is its

(A) latency

(B) latency plus transmission time

(C) latency plus seek time

(D) latency plus seek time plus transmission time

Ans: (C)


Q.13 To avoid race condition, the maximum number of processes that may be

simultaneously inside the critical section is

(A) zero 

(B) one

(C) two 

(D) more than two

Ans: (B)


Q.14 The memory allocation scheme subject to “external” fragmentation is

(A) segmentation 

(B) swapping

(C) pure demand paging 

(D) multiple fixed contiguous partitions

Ans: (A)


Q.15 Page fault frequency in an operating system is reduced when the

(A) processes tend to the I/O-bound

(B) size of pages is reduced

(C) processes tend to be CPU-bound

(D) locality of reference is applicable to the process

Ans: (D)


Q.16 In which of the following page replacement policies Balady’s anomaly occurs?

(A) FIFO 

(B) LRU

(C) LFU 

(D) NRU

Ans: (A)


Q.17 Which of the following are language processors?

(A) Assembler 

(B) Compiler

(C) Interpreter 

(D) All of the above

Ans: (D)


Q.18 Virtual memory can be implemented with

(A) Segmentation 

(B) Paging

(C) None 

(D) all of the above

Ans: (D)


Q.19 Recognition of basic syntactic constructs through reductions, this task is performed by

(A) Lexical analysis 

(B) Syntax analysis

(C) Semantic analysis 

(D) Structure analysis

Ans: (B)


Q.20 A grammar for a programming language is a formal description of

(A) Syntax 

(B) Semantics

(C) Structure 

(D) Code

Ans: (C)


Q.21 ___________ is a technique of temporarily removing inactive programs from the memory of computer system

(A) Swapping 

(B) Spooling

(C) Semaphore 

(D) Scheduler

Ans: (A)


Q.22 ___________ is a technique of improving the priority of process waiting in Queue for CPU allocation

(A) Starvation 

(B) Aging

(C) Revocation 

(D) Relocation

Ans: (B)


Q.23 ________ is the time required by a sector to reach below read/write head.

(A) Seek Time 

(B) Latency Time

(C) Access time 

(D) None

Ans: (B)


Q.24 Which of the following is most general phase structured grammar?

(A) Context – Sensitive 

(B) Regular

(C) Context – Free 

(D) None of the above

Ans: (A)


Q.25 File record length

(A) Should always be fixed

(B) Should always be variable

(C) Depends upon the size of file

(D) Should be chosen to match the data characteristics.

Ans: (D)


Q.26 A public key encryption system

(A) Allows only the correct receiver to decode the data

(B) Allows only one to decode the transmission.

(C) Allows only the correct sender to decode the data.

(D) Does not encode the data before transmitting it.

Ans: (A)

Tuesday, September 15, 2020

Operating System MCQ

 Q.1 The “blocking factor” of a file is

(A) The number of blocks accessible to a file

(B) The number of blocks allocated to a file

(C) The number of logical records in one physical record

(D) None of the above

Ans: (C)


Q.2 Which of these is a component of a process precedence sequence?

(A) Process name 

(B) Sequence operator ‘;’

(C) Concurrency operator ‘,’ 

(D) All of the above

Ans: (D)


Q.3 Which amongst the following is valid syntax of the Fork and Join Primitive?

(A) Fork <label> 

(B) Fork <label>Join <var> Join <label>

(C) For <var> 

(D) Fork <var>Join <var> join <var>

Ans: (A)


Q.4 Nested Macro calls are expanded using the

(A) FIFO rule (First in first out) 

(B) LIFO (Last in First out)

(C) FILO rule (First in last out) 

(D) None of the above

Ans: (B)


Q.5 A parser which is a variant of top-down parsing without backtracking is

(A) Recursive Descend. 

(B) Operator Precedence.

(C) LL(1) parser. 

(D) LALR Parser.

Ans: (A)


Q.6 The expansion of nested macro calls follows

(A) FIFO rule. 

(B) LIFO rule.

(C) LILO rule. 

(D) priority rule.

Ans: (B)


Q.7 In a two-pass assembler, the task of the Pass II is to

(A) separate the symbol, mnemonic opcode and operand fields.

(B) build the symbol table.

(C) construct intermediate code.

(D) synthesize the target program.

Ans: (D)


Q.8 A linker program

(A) places the program in the memory for the purpose of execution.

(B) relocates the program to execute from the specific memory area allocated to it.

(C) links the program with other programs needed for its execution.

(D) interfaces the program with the entities generating its input data.

Ans: (C)


Q.9 Which scheduling policy is most suitable for a time-shared operating system

(A) Shortest-job First. 

(B) Elevator.

(C) Round-Robin. 

(D) First-Come-First-Serve.

Ans: (C)


Q.10 A critical section is a program segment

(A) which should run in a certain specified amount of time.

(B) which avoids deadlocks.

(C) where shared resources are accessed.

(D) which must be enclosed by a pair of semaphore operations, P and V.

Ans: (C)


Q.11 An operating system contains 3 user processes each requiring 2 units of resource

R .The minimum number of units of R such that no deadlocks will ever arise is

(A) 4. 

(B) 3.

(C) 5. 

(D) 6.

Ans: (A)


Q.12 Locality of reference implies that the page reference being made by a process

(A) will always be to the page used in the previous page reference.

(B) is likely to be the one of the pages used in the last few page references.

(C) will always be to one of the pages existing in memory.

(D)will always lead to a page fault.

Ans: (B)


Q.13 Which of these is not a part of Synthesis phase

(A) Obtain machine code corresponding to the mnemonic from the Mnemonics table

(B) Obtain address of a memory operand from the symbol table

(C) Perform LC processing

(D) Synthesize a machine instruction or the machine form of a constant

Ans: (C)


Q.14 The syntax of the assembler directive EQU is

(A) EQU <address space> 

(B) <symbol>EQU<address space>

(C) <symbol>EQU 

(D) None of the above

Ans: (B)


Q.15 The following features are needed to implement top down parsing

(A) Source string marker

(B) Prediction making mechanism

(C) Matching and Backtracking mechanism

(D) All of the above

Ans: (D)


Q.16 A macro definition consists of

(A) A macro prototype statement 

(B) One or more model statements

(C) Macro pre-processor statements 

(D) All of the above

Ans: (D)


Q.17 The main reason to encrypt a file is to ______________.

(A) Reduce its size 

(B) Secure it for transmission

(C) Prepare it for backup 

(D) Include it in the start-up sequence

Ans: (B)


Q.18 Which of the following is not a key piece of information, stored in single page table entry, assuming pure paging and virtual memory

(A) Frame number

(B) A bit indicating whether the page is in physical memory or on the disk

(C) A reference for the disk block that stores the page

(D) None of the above

Ans: (C)


Q.19 A UNIX device driver is

(A) Structured into two halves called top half and bottom half

(B) Three equal partitions

(C) Unstructured

(D) None of the above

Ans: (A)


Q.20 The following is not a layer of IO management module

(A) PIOCS (Physical Input Output Control System)

(B) LIOCS (Logical Input Output Control System)

(C) FS (File System)

(D) MCS (Management Control System)

Ans: (D)


Q.21 Which amongst the following is not a valid page replacement policy?

(A) LRU policy (Least Recently Used)

(B) FIFO policy (First in first out)

(C) RU policy (Recurrently used)

(D) Optimal page replacement policy

Ans: (C)


Q.22 Consider a program with a linked origin of 5000. Let the memory area allocated to it have the start address of 70000. Which amongst the following will be the value to be loaded in relocation register?

(A) 20000 

(B) 50000

(C) 70000 

(D) 90000

Ans: (None of the above choice in correct. )


Q.23 An assembly language is a

(A) low level programming language

(B) Middle level programming language

(C) High level programming language

(D) Internet based programming language

Ans: (A)


Q.24 TII stands for

(A) Table of incomplete instructions

(B) table of information instructions

(C) translation of instructions information

(D) translation of information instruction

Ans: (A)


Q.25 An analysis, which determines the syntactic structure of the source statement, is called

(A) Sementic analysis 

(B) process analysis

(C) Syntax analysis 

(D) function analysis

Ans: (C)


Q.26 Action implementing instruction’s meaning are a actually carried out by

(A) Instruction fetch

(B) Instruction decode

(C) instruction execution

(D) Instruction program

Ans: (C)

Saturday, September 12, 2020

Operating system MCQ

Q.1 Translator for low level programming language were termed as

(A) Assembler 

(B) Compiler

(C) Linker 

(D) Loader

Ans: (A)


Q.2 Analysis which determines the meaning of a statement once its grammatical structure

becomes known is termed as

(A) Semantic analysis 

(B) Syntax analysis

(C) Regular analysis 

(D) General analysis

Ans: (A)


Q.3 Load address for the first word of the program is called

(A) Linker address origin 

(B) load address origin

(C) Phase library 

(D) absolute library

Ans: (B)


Q.4 Symbolic names can be associated with

(A) Information 

(B) data or instruction

(C) operand 

(D) mnemonic operation

Ans: (B)


Q.5 The translator which perform macro expansion is called a

(A) Macro processor 

(B) Macro pre-processor

(C) Micro pre-processor 

(D) assembler

Ans: (B)


Q.6 Shell is the exclusive feature of

(A) UNIX 

(B) DOS

(C) System software 

(D) Application software

Ans: (A)


Q.7 A program in execution is called

(A) Process 

(B) Instruction

(C) Procedure 

(D) Function

Ans: (A)


Q.8 Interval between the time of submission and completion of the job is called

(A) Waiting time 

(B) Turnaround time

(C) Throughput 

(D) Response time

Ans: (B)


Q.9 A scheduler which selects processes from secondary storage device is called

(A) Short term scheduler. 

(B) Long term scheduler.

(C) Medium term scheduler. 

(D) Process scheduler.

Ans: (C)


Q.10 The scheduling in which CPU is allocated to the process with least CPU-burst time is called

(A) Priority Scheduling 

(B) Shortest job first Scheduling

(C) Round Robin Scheduling 

(D) Multilevel Queue Scheduling

Ans: (B)


Q.11 The term ‘page traffic’ describes

(A) number of pages in memory at a given instant.

(B) number of papers required to be brought in at a given page request.

(C) the movement of pages in and out of memory.

(D) number of pages of executing programs loaded in memory.

Ans: (C)


Q.12 The “turn-around” time of a user job is the

(A) time since its submission to the time its results become available.

(B) time duration for which the CPU is allotted to the job.

(C) total time taken to execute the job.

(D) time taken for the job to move from assembly phase to completion phase.

Ans: (C)


Q.13 Which of the following can be used as a criterion for classification of data

structures used in language processing.

(A) nature of a data structure 

(B) purpose of a data structure

(C) lifetime of a data structure 

(D) all of the above.

Ans: (D)


Q.14 Memory utilization factor shall be computed as follows

(A) memory in use/allocated memory.

(B) memory in use/total memory connected.

(C) memory allocated/free existing memory.

(D) memory committed/total memory available.

Ans: (B)


Q.15 Program ‘preemption’ is

(A) forced de allocation of the CPU from a program which is executing on the CPU.

(B) release of CPU by the program after completing its task.

(C) forced allotment of CPU by a program to itself.

(D) a program terminating itself due to detection of an error.

Ans: (A)


Q.16 An assembler is

(A) programming language dependent.

(B) syntax dependant.

(C) machine dependant.

(D) data dependant.

Ans: (C)


Q.17 Which of the following is not a fundamental process state

(A) ready 

(B) terminated

(C) executing 

(D) blocked

Ans: (D)


Q.18 ‘LRU’ page replacement policy is

(A) Last Replaced Unit. 

(B) Last Restored Unit.

(C) Least Recently Used. 

(D) Least Required Unit.

Ans: (C)


Q.19 Which of the following is true?

(A) Block cipher technique is an encryption technique.

(B) Steam cipher technique is an encryption technique.

(C) Both (A) and (B).

(D) Neither of (A) and (B).

Ans: (C)


Q.20 Which of the following approaches do not require knowledge of the system state?

(A) deadlock detection. 

(B) deadlock prevention.

(C) deadlock avoidance. 

(D) none of the above.

Ans: (D)


Q.21 Program generation activity aims at

(A) Automatic generation of program

(B) Organize execution of a program written in PL

(C) Skips generation of program

(D) Speedens generation of program

Ans: (A)


Q.22 Which amongst the following is not an advantage of Distributed systems?

(A) Reliability 

(B) Incremental growth

(C) Resource sharing 

(D) None of the above

Ans: (A)


Q.23 An imperative statement

(A) Reserves areas of memory and associates names with them

(B) Indicates an action to be performed during execution of assembled program

(C) Indicates an action to be performed during optimization

(D) None of the above

Ans: (B)


Q.24 Which of the following loader is executed when a system is first turned on or restarted

(A) Boot loader 

(B) Compile and Go loader

(C) Bootstrap loader 

(D) Relating loader

Ans: (C)


Q.25 Poor response time is usually caused by

(A) Process busy

(B) High I/O rates

(C) High paging rates

(D) Any of the above

Ans: (D)


Q.26 “Throughput” of a system is

(A) Number of programs processed by it per unit time

(B) Number of times the program is invoked by the system

(C) Number of requests made to a program by the system

(D) None of the above

Ans: (A)

Monday, June 22, 2020

Advance Operating System Quiz

1. Which of the following is the reason that the least recently used (LRU) algorithm is usually not used as a page replacement algorithm?

A. Other practical schemes such as MIN do a better job.

B. LRU requires knowledge of the future to work correctly.

C. LRU is too inefficient to implement in practice.

D. The Clock algorithm always outperforms LRU.

 

2. Which of the following are shared between threads in the same process?

A. registers

B. page table

C. stack

D. stack pointer

E. None of these are shared

 

3. The IP service model guarantees which of the following?

A. The contents of a packet will not be corrupted

B. That at least one copy of a packet will arrive at the destination

C. That no more than one copy of a packet will arrive at the destination

D. That packets sent in order will be delivered in order

E. None of the above

 

4. Using the SCAN (a.k.a. elevator) disk scheduling algorithm, determine how far the disk head moves servicing the following outstanding requests: 150, 19, 20, 900, 99. Assume the disk's head is currently over track 100 and moving toward smaller track numbers.  Also, assume that all of these track requests have already been received.

A. 962 tracks

B. 1064 tracks

C. 1681 tracks

D. 1863 tracks

E. None of these are true

 

5. If a process has allocated every 1024th virtual page (e.g. it has allocated virtual pages 0, 1024, 2048, 3072, 4096, 5120 ... 1024000), which one of the following page table schemes will use the LEAST amount of memory?

A. A flat page table

B. A two-level page table with 1024 first level entries

C. A two-level page table with 2048 first level entries

D. An inverted page table

E. Each of the above page table will use exactly the same amount of memory


6. Making no assumptions about the processes being scheduled, which of these scheduling algorithms will prevent starvation?

I. First Come First Served  (doesn’t work if a job runs forever—infinite loop)

II. Round Robin

III. Priority

 

A. I

B. II

C. I & III

D. I, II, & III

 

7. Consider a group of RAID4 disks. This group has four data disks and one parity disk. Which of the following are true?

I. Any data disk but NOT the parity disk can be reconstructed from the other four

II. The parity disk must be read whenever one of the data disks is read

III. The parity disk must be written whenever one of the data disks is written

 

A. III

B. I & III

C. II & III

D. I, II, & III

E. None of the above

 

8. Which of the following is true about two threads running in the same process?

A. One thread can both read and write another thread's registers

B. One thread can change the other thread's program counter

C. One thread can neither read nor write the other thread's stack

D. One thread can both read and write the other thread's stack (there is no address space protection between threads in the same process)

 

9.Which disk block allocation scheme will require the most I/O operations for random access to a large file?

A. Indexed allocation

B. Linked allocation

C. Contiguous allocation

D. I-node allocation

E. Each scheme requires approximately the same number of I/O operations

 

10. Which of the following does NOT solve deadlock?

A. Acquiring all resources before using any of them   (this is not acquiring all resources or no resources.  This doesn’t eliminate hold and wait)

B. Only acquiring resources in order based on a predetermined priority

C. Acquiring a maximum of one resource at a time (can’t have hold and wait if only have one resource)

D. If a resource is unavailable, releasing all resources and waiting for all required resources to become available


11. What is the primary reason that a translation lookaside buffer (TLB) is used?

A. A TLB ensures that a process does not access memory outside of its address space

B. A TLB makes translating virtual addresses to physical addresses faster

C. A TLB allows multiple processes to share the L1 cache

D. A TLB makes translating virtual addresses to physical addresses possible

E. None of the above

 

12. Which of the following is not a solution to thrashing?

A. Running fewer processes

B. Increasing the speed of the CPU

C. Increasing the size of physical memory

D. Rewriting programs to have better locality

E. These all solve the problem of thrashing

 

13. Which of the following is NOT a way to make file systems faster?

A. Put parts of a file on many different tracks so part of it can be accessed no matter where the disk head is

B. Cache frequently used blocks in memory so they can be accessed at memory speeds instead of disk speeds

C. Use a disk scheduling algorithm to minimize the distance between seeks

D. Put frequently used files or directories near the center of the disk so on average they won't be far from the read head

E. All of these will make a file system faster

 

14. Which of the following is true about base and bounds registers?

I. They offer protection between processes

II. They lead to internal fragmentation of physical memory

III. Once a process has been started at a given memory location, it cannot be moved to another location

 

A. I

B. II

C. I & II

D. I, II, & III

E. None of the above

 

15. Which of the following can I do without knowing your private key?

A. Pretend to send a private message on your behalf

B. Decrypt messages that were intended for only you

C. Send you a message that only you can read

D. Digitally sign a message on your behalf

E.  I must know your private key to perform all of these operations

 


16. Public/private key encryption is usually avoided because

A. It is much slower than symmetric key encryption

B. It is only useful when encrypting large amounts of data

C. It is not as secure as symmetric key encryption

D. It cannot be used unless two parties can exchange their private keys securely

E. None of the above

Suppose a system has only three physical pages. Given the following sequence of virtual page references, determine the number of page faults that are required. Initially, assume that the physical pages are not being used by any virtual page.

1 2 1 1 3 2 1 4 3 1 1 2 4 1 5 6 2 1

17. Using the first in first out (FIFO) replacement policy

A. 9

B. 10

C. 11

D. 12

E.  None of the above

 

18. Using the least recently used (LRU) replacement policy

A. 9

B. 10

C. 11

D. 12

E.  None of the above

 

 

19. Which of the following is NOT a use of TCP sequence numbers?

A. To ensure that data is delivered to the application in the order it was sent

B. To distinguish duplicate packets

C. To determine how much data is left to send

D. All of these are uses

 

20. Which of the following is NOT a property of Ethernet?

A. Nodes retransmit packets if there was a collision

B. Sending packets that are too big does NOT affect collision detection

C. Nodes retransmit packets if an acknowledgement is not received

D. After a collision, both nodes wait a random amount of time before retransmitting a packet

E. These are all properties of Ethernet


Search Aptipedia