Wednesday, June 03, 2020

Database management quiz

In the relational model, cardinality is termed as:
A) A number of tuples. 
B) A number of attributes.
C) A number of tables. 
D) A number of constraints.
ANSWER: A

Relational calculus is a
A) Procedural language. 
B) Non- Procedural language.
C) Data definition language. 
D) High-level language.
ANSWER: B

The view of total database content is
A) Conceptual view. 
B) Internal view.
C) External view. 
D) Physical View.
ANSWER: A

Cartesian product in relational algebra is
A) a Unary operator. 
B) a Binary operator.
C) a Ternary operator. 
D) not defined.
ANSWER: B 

DML is provided for
A) Description of the logical structure of a database.
B) The addition of new structures in the database system.
C) Manipulation & processing of the database.
D) Definition of a physical structure of the database system.
ANSWER: C
 
‘AS’ clause is used in SQL for
A) Selection operation. 
B) Rename operation.
C) Join operation. 
D) Projection operation.
ANSWER: B

ODBC stands for
A) Object Database Connectivity.
B) Oral Database Connectivity.
C) Oracle Database Connectivity.
D) Open Database Connectivity.
ANSWER: D

Architecture of the database can be viewed as
A) two levels. 
B) four levels.
C) three levels. 
D) one level.
ANSWER: C

In a relational model, relations are termed as
A) Tuples. 
B) Attributes
C) Tables. 
D) Rows.
ANSWER: c

The database schema is written in
A) HLL 
B) DML
C) DDL 
D) DCL
ANSWER: C

In the architecture of a database system external level is the
A) physical level. 
B) logical level.
C) conceptual level 
D) view level.
ANSWER: D

An entity set that does not have sufficient attributes to form a primary key is a
A) strong entity set. 
B) weak entity set.
C) simple entity set. 
D) primary entity set.
ANSWER: B

In an E-R diagram attributes are represented by
A) rectangle. 
B) square.
C) ellipse. 
D) triangle.
ANSWER: C

In case of entity integrity, the primary key maybe
A) not Null 
B) Null
C) both Null & not Null. 
D) any value.
ANSWER: A

The language used in application programs to request data from the DBMS is referred to as the
A) DML 
B) DDL
C) VDL 
D) SDL
ANSWER: A

A logical schema
A) is the entire database.
B) is a standard way of organising information into accessible parts.
C) describes how data is actually stored on disk.
D) both (A) and (C)
ANSWER: A

Related fields in a database are grouped to form a
A) data file. 
B) data record.
C) menu. 
D) bank.
ANSWER: B

The database environment has all of the following components except:
A) users.
B) separate files.
C) database. 
D) database administrator.
ANSWER: A.

The language which has recently become the defacto standard for interfacing application programs with relational database system is
A) Oracle. 
B) SQL.
C) DBase. 
D) 4GL.
ANSWER: B

The way a particular application views the data from the database that the application uses is a
A) module. 
B) relational model.
C) schema. 
D) subschema.
ANSWER: D

In an E-R diagram an entity set is represent by a
A) rectangle. 
B) ellipse.
C) diamond box. 
D) circle.
ANSWER: A

A report generator is used to
A) update files. 
B) print files on paper.
C) data entry. 
D) delete files.
ANSWER: B

The property/properties of a database is/are:
A) It is an integrated collection of logically related records.
B) It consolidates separate files into a common pool of data records.
C) Data stored in a database is independent of the application programs using it.
D) All of the above.
ANSWER: D

The DBMS language component which can be embedded in a program is
A) The data definition language (DDL).
B) The data manipulation language (DML).
C) The database administrator (DBA).
D) A query language.
ANSWER: B

A relational database developer refers to a record as
A) Criteria.
B) a relation.
C) a tuple. 
D) an attribute.
ANSWER: C

The relational model feature is that there
A) is no need for primary key data.
B) is much more data independence than some other database models.
C) are explicit relationships among records.
D) are tables with many dimensions.
ANSWER: B

Conceptual design
A) is a documentation technique.
B) needs data volume and processing frequencies to determine the size of the database.
C) involves modelling independent of the DBMS.
D) is designing the relational model.
ANSWER: C

The method in which records are physically stored in a specified order according to a key field in each record is
A) hash. 
B) direct.
C) sequential. 
D) all of the above.
ANSWER: A

A subschema expresses
A) the logical view. 
B) the physical view.
C) the external view.
D) all of the above.
ANSWER: C

Count function in SQL returns the number of
A) values. 
B) distinct values.
C) groups. 
D) columns.
ANSWER: A

Which one of the following statements is false?
A) The data dictionary is normally maintained by the database administrator.
B) Data elements in the database can be modified by changing the data dictionary.
C) The data dictionary contains the name and description of each data element.
D) A data dictionary is a tool used exclusively by the database administrator.
ANSWER: B

An advantage of the database management approach is
A) data is dependent on programs.
B) data redundancy increases.
C) data is integrated and can be accessed by multiple programs.
D) none of the above.
ANSWER: C

A DBMS query language is designed to
A) support end users who use English-like commands.
B) support in the development of complex applications software.
C) specify the structure of a database.
D) all of the above.
ANSWER: D

Transaction processing is associated with everything below except
A) producing detail, summary, or exception reports.
B) recording a business activity.
C) confirming an action or triggering a response.
D) maintaining data.
ANSWER: C

It is possible to define a schema completely using
A) VDL and DDL. 
B) DDL and DML.
C) SDL and DDL. 
D) VDL and DML.
ANSWER: B

The method of access which uses key transformation is known as
A) direct.
B) hash.
C) random. 
D) sequential.
ANSWER: B

Data independence 
A) data is defined separately and not included in programs.
B) programs are not dependent on the physical attributes of data.
C) programs are not dependent on the logical attributes of data.
D) both (B) and (C).
ANSWER: D both (B) and (C)

The statement in SQL which allows changing the definition of a table is
A) Alter. 
B) Update.
C) Create. 
D) select.
ANSWER: A.

E-R model uses this symbol to represent a weak entity set?
A) Dotted rectangle.
B) Diamond
C) Doubly outlined rectangle
D) None of these
ANSWER: C

Relational Algebra is
A) Data Definition Language.
B) Meta Language
C) Procedural query Language
D) None of the above
ANSWER: C

Key to represent the relationship between tables is called
A) Primary key
B) Secondary Key
C) Foreign Key
D) None of these
ANSWER: C

_______ produces the relation that has attributes of R1 and R2
A) Cartesian product 
B) Difference
C) Intersection 
D) Product
ANSWER: A

The file organisation that provides very fast access to any arbitrary record of a file is
A) Ordered file 
B) Unordered file
C) Hashed file 
D) B-tree
ANSWER: C

DBMS helps achieve
A) Data independence
B) Centralised control of data
C) Neither (A) or (B)
D) both (A) and (B)
ANSWER: D

Which of the following are the properties of entities?
A) Groups 
B) Table
C) Attributes 
D) Switchboards
ANSWER: C

In a relation
A) Ordering of rows is immaterial
B) No two rows are identical
C) (A) and (B) both are true
D) None of these.
ANSWER: C

Which of the following is correct:
A) a SQL query automatically eliminates duplicates.
B) SQL permits attribute names to be repeated in the same relation.
C) a SQL query will not work if there are no indexes on the relations
D) None of these
ANSWER: D

It is better to use files than a DBMS when there are
A) Stringent real-time requirements.
B) Multiple users wish to access the data.
C) Complex relationships among data.
D) All of the above.
ANSWER: B

The conceptual model is
A) dependent on hardware.
B) dependent on software.
C) dependent on both hardware and software.
D) independent of both hardware and software.
ANSWER: D

What is a relationship called when it is maintained between two entities?
A) Unary 
B) Binary
C) Ternary 
D) Quaternary
ANSWER: B


Which of the following is a valid SQL type?
A) CHARACTER 
B) NUMERIC
C) FLOAT 
D) All of the above
ANSWER: D

The RDBMS terminology for a row is
A) tuple. 
B) relation.
C) attribute.
 D) degree.
ANSWER: A

The full form of DDL is
A) Dynamic Data Language 
B) Detailed Data Language
C) Data Definition Language 
D) Data Derivation Language
ANSWER: C

Which of the following is an advantage of view?
A) Data security 
B) Derived columns
C) Hiding of complex queries 
D) All of the above
ANSWER: D

Which of the following is a legal expression in SQL?
A) SELECT NULL FROM EMPLOYEE;
B) SELECT NAME FROM EMPLOYEE;
C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
D) None of the above
ANSWER: B

The users who use the easy-to-use menu are called
A) Sophisticated end users. 
B) Naïve users.
C) Stand-alone users. 
D) Casual end users.
ANSWER: B

Which are the two ways in which entities can participate in a relationship?
A) Passive and active 
B) Total and partial
C) Simple and Complex 
D) All of the above
ANSWER: B

The result of the UNION operation between R1 and R2 is a relation that includes
A) all the tuples of R1
B) all the tuples of R2
C) all the tuples of R1 and R2
D) all the tuples of R1 and R2 which have common columns
ANSWER: D

Which of the following is a comparison operator in SQL?
A) = 
B) LIKE
C) BETWEEN 
D) All of the above
ANSWER: D

A set of possible data values is called
A) attribute. 
B) degree.
C) tuple. 
D) domain.
ANSWER: D

Which of the operations constitute a basic set of operations for manipulating relational data?
A) Predicate calculus 
B) Relational calculus
C) Relational algebra 
D) None of the above
ANSWER: C

Which of the following is another name for the weak entity?
A) Child 
B) Owner
C) Dominant 
D) All of the above
ANSWER: A

Which of the following database object does not physically exist?
A) base table 
B) index
C) view
D) none of the above
ANSWER: C

NULL is
A) the same as 0 for integer
B) the same as blank for character
C) the same as 0 for integer and blank for character
D) not a value
ANSWER: D

Which of the following is a record based logical model?
A) Network Model 
B) Object-oriented model
C) E-R Model 
D) None of these
ANSWER: A

A data dictionary is a special file that contains:
A) The name of all fields in all files.
B) The width of all fields in all files.
C) The data type of all fields in all files.
D) All of the above.
ANSWER: D

A file manipulation command that extracts some of the records from a file is called
A) SELECT 
B) PROJECT
C) JOIN 
D) PRODUCT
ANSWER: A

The physical location of a record is determined by a mathematical formula that transforms a file key into a record location is:
A) B-Tree File 
B) Hashed File
C) Indexed File
D) Sequential file.
ANSWER: B


A primary key is combined with a foreign key creates
A) Parent-Child relationship between the tables that connect them.
B) Many to many relationships between the tables that connect them.
C) Network model between the tables that connect them.
D) None of the above.
ANSWER: A

In E-R Diagram derived attribute is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Triangle
ANSWER: B

An instance of relational schema R (A, B, C) has distinct values of A, including NULL values. Which one of the following is true?
A) A is a candidate key 
B) A is not a candidate key
C) A is a primary Key 
D) Both (A) and (C)
ANSWER: B

The natural join is equal to:
A) Cartesian Product
B) Combination of Union and Cartesian product
C) Combination of selection and Cartesian product
D) Combination of projection and Cartesian product
ANSWER: D

Which one of the following is not true for a view:
A) A view is derived from other tables.
B) A view is a virtual table.
C) A view definition is permanently stored as part of the database.
D) The view never contains derived columns.
ANSWER: C

A primary key, if combined with a foreign key, creates
A) Parent-Child relationship between the tables that connect them.
B) Many to many relationships between the tables that connect them.
C) Network model between the tables that connect them.
D) None of the above.
ANSWER: A

In E-R Diagram relationship type is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Diamond
ANSWER: D

Hierarchical model is also called
A) Tree structure 
B) Plex Structure
C) Normalise Structure 
D) Table Structure
ANSWER: A

To delete a particular column in a relation the command used is:
A) UPDATE 
B) DROP
C) ALTER 
D) DELETE
ANSWER: C

The ______ operator is used to compare a value to a list of literals values that have been specified.
A) BETWEEN 
B) ANY
C) IN 
D) ALL
ANSWER: A

A logical schema
A) is the entire database
B) is a standard way of organising information into an accessible part
C) describe how data is actually stored on disk
D) none of these
ANSWER: D

_____________ function divides one numeric expression by another and returns the remainder.
A) POWER 
B) MOD
C) ROUND 
D) REMAINDER
ANSWER: B

A data manipulation command the combines the records from one or more tables is called
A) SELECT 
B) PROJECT
C) JOIN 
D) PRODUCT
ANSWER: C

In E-R diagram generalisation is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Triangle
ANSWER: D

_________ is a virtual table that draws its data from the result of an SQL SELECT statement.
A) View 
B) Synonym
C) Sequence 
D) Transaction
ANSWER: A

A table joined with itself is called
A) Join 
B) Self Join
C) Outer Join 
D) Equi Join
ANSWER: B

_________ data type can store unstructured data
A) RAW 
B) CHAR
C) NUMERIC 
D) VARCHAR
ANSWER: A

A relational database consists of a collection of
A) Tables
B) Fields
C) Records
D) Keys
ANSWER: A

The term _______ is used to refer to a row.
A) Attribute
B) Tuple
C) Field
D) Instance
ANSWER: B

Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.
A) Instance, Schema
B) Relation, Schema
C) Relation, Domain
D) Schema, Instance
ANSWER: D

A domain is atomic if elements of the domain are considered to be ____________ units.
A) Different
B) Indivisbile
C) Constant
D) Divisible
ANSWER: B

The tuples of the relations can be of ________ order.
A) Any
B) Same
C) Sorted
D) Constant
ANSWER: A

Entity is a
A) Object of relation
B) Present working model
C) Thing in real world
D) Model of relation
ANSWER: C

The descriptive property possessed by each entity set is _________ .
A) Entity
B) Attribute
C) Relation
D) Model
ANSWER: B

The attribute AGE is calculated from DATE_OF_BIRTH . The attribute AGE is
A) Single valued
B) Multi valued
C) Composite
D) Derived
ANSWER: D

Which of the following is a single valued attribute
A) Register_number
B) Address
C) SUBJECT_TAKEN
D) Reference
ANSWER:A

A relational database system needs to maintain data about the relations, such as the schema of the relations. This is called
A) Metadata
B) Catalog
C) Log
D) Dictionary
ANSWER: A

If a piece of data is stored in two places in the database, then
A) Storage space is wasted
B) Changing the data in one spot will cause data inconsistency
C) In can be more easily accessed
D) Both a and b
ANSWER: D

Large collection of files are called ____________ .
A) Fields
B) Records
C) Database
D) Sectors
ANSWER:  C

Which of these data models is an extension of relational data model?
A) Object-oriented data model
B) Object-relational data model
C) Semi structured data model
D) None of the mentioned
ANSWER: B

The information about data in a database is called _______.
A) Metadata
B) Hyper data
C) Tera data
D) None of the mentioned
ANSWER: A

A data dictionary is a special file that contains?
A) The names of all fields in all files
B) The data types of all fields in all files
C) The widths of all fields in all files
D) All of the mentioned
ANSWER: D

The DBMS acts as an interface between what two components of an enterprise-class database system?
A) Database application and the database
B) Data and the database
C) The user and the database application
D) Database application and SQL
ANSWER: A

A data dictionary is created when a __________ created.
A) Instance
B) Segment
C) Database
D) Dictionary
ANSWER: C

________ is the smallest unit of allocation in an Oracle database.
A) Database
B) Instance
C) Tablespace
D) Database Block
ANSWER: D

A tablespace is further broken down into ________
A) Tablespace
B) Segments
C) Extents
D) Blocks
ANSWER: B

Which of the following gives a logical structure of the database graphically ?
A) Entity-relationship diagram
B) Entity diagram
C) Database diagram
D) Architectural representation
ANSWER: A

The entity relationship set is represented in E-R diagram as
A) Double diamonds
B) Undivided rectangles
C) Dashed lines
D) Diamond
ANSWER: D

Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?
A) Candidate key
B) Sub key
C) Super key
D) Foreign key
ANSWER: C

A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.
A) Rows
B) Key
C) Attribute
D) Fields
ANSWER: B

Which one of the following cannot be taken as a primary key ?
A) Id
B) Register number
C) Dept_id
D) Street
ANSWER: D

A attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that relation .
A) Candidate
B) Primary
C) Super
D) Sub
ANSWER: B

The ______ is the one in which the primary key of one relation is used as a normal attribute in another relation .
A) Referential relation
B) Referencing relation
C) Referenced relation
D) Referred relation
ANSWER: C

For each attribute of a relation, there is a set of permitted values, called the ________ of that attribute.
A) Domain
B) Relation
C) Set
D) Schema
ANSWER: A

The tuples of the relations can be of ________ order.
A) Any
B) Same
C) Sorted
D) Constant
ANSWER: A

Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.
A) Instance, Schema
B) Relation, Schema
C) Relation, Domain
D) Schema, Instance
ANSWER: D

Basic operating system quiz

Concurrent process are
A. process that do not overlap in time
B. process that overlap in time
C. processes that executed by a processor at the same time
D. none of the above
ANSWER: C

The only state transition that is initiated by the user process itself is
A. Block
B. Dispatch
C. Wakeup
D. None of the above
ANSWER: A

which of the following are real time operating system
A. an on-line railway reservation system
B. a process control system
C. aircraft control system
D. payroll processing system
ANSWER: C

Critical region is
A. A part of the operating system which is not allowed to be accessed by any process
B. A set of instructions that access common shared resource which exclude one another in time
C. The portion of the main memory which can be accessed only by one process at a time
D. None of the above
ANSWER: B

in a time sharing operating system, when the time slot given to a process is completed, the process goes from running state to the
A. BLOCKED state
B. READY state
C. SUSPENDED state
D. TERMINATED state
ANSWER: B 

At a particular time, the value of a counting semaphore is 10. It will become 7 after
A. 3 V operations
B. 3 P operations
C. 5 V operations and 2 P operations
D. 13 P operations and 10 V operations
ANSWER: D

Semaphores are used to solve the problem of
A. Race condition
B. Process synchronization
C. Mutual exclusion
D. None of the above
ANSWER: B

Pre-emptive scheduling is the strategy of the temporarily suspending a running process
A. Before the CPU time slice expires
B. To allow starving process to run
C. When it requests I/O
D. None of the above
ANSWER: C

Mutual exclusion problem occurs between
A. Two disjoint process that do not interact
B. Process that share resources
C. Process that do not use the same resources
D. None of the above
ANSWER: B

Which of the following is a service not supported by the operating system?
A. Protection
B. Accounting
C. Compilation
D. I/O operation
ANSWER: C

In round robin CPU scheduling, as the quantum is increased, the average turn around time
A. increases
B. decreases
C. remains constant
D. varies irregularly
ANSWER: D

In a multiprogramming environment,
A. the processor executes more than one process at a time
B. the programs are developed by more than one person
C. more than one process is resident in the memory
D. a single user can execute many programs in the same time
ANSWER: C

In which of the following scheduling policies does context switching never take place?
A. Round-robin
B. SJF
C. Pre-emptive
D. FCFS
ANSWER: D

suppose that a process is in ‘BLOCKED’ state waiting for some I/O service. When the service is completed, it goes to the
A. RUNNING state
B. READY state
C. SUSPENDED state
D. TERMINATED state
ANSWER: B

In real time operating system, which of the following is most suitable scheduling scheme?
A. Round-robin
B. FCFS
C. Pre-emptive scheduling
D. Random scheduling
ANSWER: A

Which of the following scheduling algorithms gives minimum average waiting time
A. FCFS
B. SJF
C. Round-Robin
D. Priority
ANSWER: B

Which of the following scheduling policy is well suited for a time sharing operating system
A. SJF
B. Round-robin
C. FCFS
D. Priority
ANSWER: B

Process is
A. Program under execution
B. Content of main memory
C. A job in secondary memory
D. Program on disk
ANSWER: A

Convoy effect is the problem of:
A. FCFS       
B. SJF               
C. SRTF          
D. Round Robin
ANSWER: A

Which module gives control of the CPU to the process selected by the short-term scheduler?
A. Dispatcher          
B. interrupt             
C. scheduler             
D. None of these
ANSWER: A

Which one of the following cannot be scheduled by the kernel?
A. Kernel level               
B. user level thread              
C. process                  
D. none of these
ANSWER: A

a thread is also called:
A. Light weight process (LWP)        
B. Heavy weight process (HWP)      
C. Process    
D. None of these
ANSWER: A

Inter-process communication:
A. Is required for all processes
B. Is usually done via disk drives
C. Needed in case of co-operative processes
D. Is never necessary
ANSWER: C

Interval between the time of submission and completion of the job is called:
A. Waiting time
B. Turnaround time
C. Throughput
D. Response time
ANSWER: B

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. A program terminating itself due to detection of an error
D. None of the above
ANSWER: A

Difference of burst time and turnaround time is:
A. Waiting time
B. Response time
C. Actual time
D. None of the above
ANSWER: c

CPU scheduler is also known as:
A. Long term scheduler
B. Short term scheduler
C. Midterm scheduler
D. None
ANSWER: B

Long term scheduler is also known as:
A. Short term scheduler
B. CPU scheduler
C. Job scheduler
D. Midterm scheduler
ANSWER: C

Which is not the state of process?
A. Blocked
B. Running
C. Ready
D. Privileged
ANSWER: D

SJF is:
A. Preemptive
B. Non Preemptive
C. Both (A. and (B.
D. None of the above
ANSWER: C

A process can be
A. Single threaded
B. Multithreaded
C. Both (A. and (B.
D. none of the mentioned
ANSWER: C

Which one of the following is not shared by threads?
A. program counter
B. Stack
C. both (A. and (B.
D. none of the mentioned
ANSWER: C

One of the disadvantages of the priority scheduling algorithm is that :
A. it schedules in a very complex manner
B. its scheduling takes up a lot of time
C. It can lead to some low priority process waiting indefinitely for the CPU
D. None of these
ANSWER: C

Preemptive Shortest Job First scheduling is sometimes called: 
A. Fast SJF scheduling
B. EDF scheduling – Earliest Deadline First
C. HRRN scheduling – Highest Response Ratio Next
D. SRTF scheduling – Shortest Remaining Time First
ANSWER: D

Scheduling is: 
A. allowing a job to use the processor
B. Making proper use of processor
C. Both a and b
D. None of these
ANSWER: C

The FIFO algorithm: 
A. first executes the job that came in last in the queue
B. first executes the job that came in first in the queue
C. first executes the job that needs minimal processor
D. first executes the job that has maximum processor needs
ANSWER: B

With round robin scheduling algorithm in a time shared system,
A. using very large time slices converts it into First come First served scheduling algorithm
B. Using very small time slices converts it into First come first served scheduling algorithm
C. using extremely small time slices increases performance
D. using very small time slices converts it into Shortest Job First algorithm
ANSWER: A

The degree of multi-programming is
A. the number of processes executed per unit time
B. the number of processes in the ready queue
C. the number of processes in the I/O queue
D. the number of processes in memory
ANSWER: B

The Process Control Block is
A. Process type variable
B. Data Structure
C. a secondary storage section
D. a Block in memory
ANSWER: B

The state of a process is defined by: 
A. the final activity of the process
B. the activity just executed by the process
C. the activity to next be executed by the process
D. the current activity of the process
ANSWER: D

The number of processes completed per unit time is known as __________.
A. Output
B. Throughput
C. Efficiency
D. Capacity
ANSWER: B

Time quantum is defined in
A. shortest job scheduling algorithm
B. round robin scheduling algorithm
C. priority scheduling algorithm
D.  multilevel queue scheduling algorithm
ANSWER: B

Which module gives control of the CPU to the process selected by the short-term scheduler?
A. Dispatcher
B. interrupt
C. scheduler
D. none of the mentioned
ANSWER: A

The processes that are residing in main memory and are ready and waiting to execute are kept on a list called
A. job queue
B. ready queue
C. execution queue
D. process queue
ANSWER: B

The systems which allows only one process execution at a time, are called
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
ANSWER: B

In operating system, each process has its own
a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned
ANSWER: A

In Unix, Which system call creates the new process?
a) fork
b) create
c) new
d) none of the mentioned
ANSWER: A

A process can be terminated due to
a) normal exit
b) fatal error
c) killed by another process
d) all of the mentioned
ANSWER: D

What is the ready state of a process?
a) when process is scheduled to run after some execution
b) when process is unable to run until some task has been completed
c) when process is using the CPU
d) none of the mentioned
ANSWER: A

What is interprocess communication?
a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) none of the mentioned
ANSWER: B

A set of processes is deadlock if
a) each process is blocked and will remain so forever
b) each process is terminated
c) all processes are trying to kill each other
d) none of the mentioned
ANSWER: A

A process stack does not contain
a) Function parameters
b) Local variables
c) Return addresses
d) PID of child process
ANSWER: D

A Process Control Block(PCB) does not contain which of the following :
a) Code
b) Stack
c) Bootstrap program
d) Data
ANSWER: C

Which of the following is not the state of a process?
a) New
b) Old
c) Waiting
d) Running
ANSWER: B

The Process Control Block is:
a) Process type variable
b) Data Structure
c) A secondary storage section
d) A Block in memory
ANSWER: B

The entry of all the PCBs of the current processes is in:
a) Process Register
b) Program Counter
c) Process Table
d) Process Unit
ANSWER: C

Inter process communication :
a) allows processes to communicate and synchronize their actions when using the same address space
b) allows processes to communicate and synchronize their actions without using the same address space
c) allows the processes to only synchronize their actions without communication
d) none of the mentioned
ANSWER: A

Message passing system allows processes to :
a) communicate with one another without resorting to shared data
b) communicate with one another by resorting to shared data
c) share data
d) name the recipient or sender of the message
ANSWER: D

An IPC facility provides at least two operations :
a) write & delete message
b) delete & receive message
c) send & delete message
d) receive & send message
ANSWER: D

Messages sent by a process :
a) have to be of a fixed size
b) have to be a variable size
c) can be fixed or variable sized
d) None of the mentioned
ANSWER: A

The link between two processes P and Q to send and receive messages is called :
a) communication link
b) message-passing link
c) synchronization link
d) all of the mentioned
ANSWER: D

A parent process calling _____ system call will be suspended until children processes terminate.
a) wait
b) fork
c) exit
d) exec
ANSWER: C

4. With _____________ only one process can execute at a time; meanwhile all other process are waiting for the processor. With ______________ more than one process can be running simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing
ANSWER: D

7. The child process can :
a) be a duplicate of the parent process
b) never be a duplicate of the parent process
c) cannot have another program loaded into it
d) never have another program loaded into it
ANSWER: B

The child process completes execution,but the parent keeps executing, then the child process is known as :
a) Orphan
b) Zombie
c) Body
d) Dead
ANSWER: B

Which of the following do not belong to queues for processes ?
a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue
ANSWER: B

When the process issues an I/O request :
a) It is placed in an I/O queue
b) It is placed in a waiting queue
c) It is placed in the ready queue
d) It is placed in the Job queue
ANSWER: B

When a process terminates :
a) It is removed from all queues
b) It is removed from all, but the job queue
c) Its process control block is de-allocated
d) Its process control block is never de-allocated
ANSWER: C

What is a long-term scheduler ?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
ANSWER: A

If all processes I/O bound, the ready queue will almost always be ______ and the Short term Scheduler will have a ______ to do.
a) full,little
b) full,lot
c) empty,little
d) empty,lot
ANSWER: C

What is a medium-term scheduler ?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
ANSWER: C

What is a short-term scheduler ?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
ANSWER: B

The primary distinction between the short term scheduler and the long term scheduler is :
a) The length of their queues
b) The type of processes they schedule
c) The frequency of their execution
d) None of the mentioned
ANSWER: D

The only state transition that is initiated by the user process itself is :
a) block
b) wakeup
c) dispatch
d) none of the mentioned
ANSWER: B

In a time-sharing operating system, when the time slot given to a process is completed, the process goes from the running state to the :
a) Blocked state
b) Ready state
c) Suspended state
d) Terminated state
ANSWER: D

The context of a process in the PCB of a process does not contain :
a) the value of the CPU registers
b) the process state
c) memory-management information
d) context switch time
ANSWER: A

Which module gives control of the CPU to the process selected by the short-term scheduler?
a) dispatcher
b) interrupt
c) scheduler
d) none of the mentioned
ANSWER: A

The processes that are residing in main memory and are ready and waiting to execute are kept on a list called
a) job queue
b) ready queue
c) execution queue
d) process queue
ANSWER: B

The interval from the time of submission of a process to the time of completion is termed as
a) waiting time
b) turnaround time
c) response time
d) throughput
ANSWER: B

Which scheduling algorithm allocates the CPU first to the process that requests the CPU first?
a) first-come, first-served scheduling
b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
ANSWER: A

In priority scheduling algorithm
a) CPU is allocated to the process with highest priority
b) CPU is allocated to the process with lowest priority
c) Equal priority processes can not be scheduled
d) None of the mentioned
ANSWER: A

In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with the priority of
a) all process
b) currently running process
c) parent process
d) init process
ANSWER: A

CPU scheduling is the basis of ___________
a) multiprocessor systems
b) multiprogramming operating systems
c) larger memory sized systems
d) none of the mentioned
ANSWER: A

With multiprogramming, ______ is used productively.
a) time
b) space
c) money
d) all of the mentioned
ANSWER: A

The two steps of a process execution are :
a) I/O & OS Burst
b) CPU & I/O Burst
c) Memory & I/O Burst
d) OS & Memory Burst
ANSWER: B

A process is selected from the ______ queue by the ________ scheduler, to be executed.
a) blocked, short term
b) wait, long term
c) ready, short term
d) ready, long term
ANSWER: C

In the following cases non – preemptive scheduling occurs :
a) When a process switches from the running state to the ready state
b) When a process goes from the running state to the waiting state
c) When a process switches from the waiting state to the ready state
d) All of the mentioned
ANSWER: B

The switching of the CPU from one process or thread to another is called :
a) process switch
b) task switch
c) context switch
d) all of the mentioned
ANSWER: C

Scheduling is done so as to :
a) increase CPU utilization
b) decrease CPU utilization
c) keep the CPU more idle
d) None of the mentioned
ANSWER: A

Scheduling is done so as to :
a) increase the throughput
b) decrease the throughput
c) increase the duration of a specific amount of work
d) None of the mentioned
ANSWER: A

Turnaround time is :
a) the total waiting time for a process to finish execution
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
ANSWER: D

Scheduling is done so as to :
a) increase the turnaround time
b) decrease the turnaround time
c) keep the turnaround time same
d) there is no relation between scheduling and turnaround time
ANSWER: D

Waiting time is :
a) the total time in the blocked and waiting queues
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
ANSWER: A

Scheduling is done so as to :
a) increase the waiting time
b) keep the waiting time the same
c) decrease the waiting time
d) none of the mentioned
ANSWER: C

Response time is :
a) the total time taken from the submission time till the completion time
b) the total time taken from the submission time till the first response is produced
c) the total time taken from submission time till the response is output
d) none of the mentioned
ANSWER: B

Round robin scheduling falls under the category of :
a) Non preemptive scheduling
b) Preemptive scheduling
c) All of the mentioned
d) None of the mentioned
ANSWER: B

With round robin scheduling algorithm in a time shared system,
a) using very large time slices converts it into First come First served scheduling algorithm
b) using very small time slices converts it into First come First served scheduling algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm
ANSWER: A

5. The FIFO algorithm :
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs
ANSWER: B

The strategy of making processes that are logically runnable to be temporarily suspended is called :
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served
ANSWER: B

Scheduling is :
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned
ANSWER: A

The most optimal scheduling algorithm is :
a) FCFS – First come First served
b) SJF – Shortest Job First
c) RR – Round Robin
d) None of the mentioned
ANSWER: B

The real difficulty with SJF in short term scheduling is :
a) it is too good an algorithm
b) knowing the length of the next CPU request
c) it is too complex to understand
d) none of the mentioned
ANSWER: B

The FCFS algorithm is particularly troublesome for ____________
a) time sharing systems
b) multiprogramming systems
c) multiprocessor systems
d) operating systems
ANSWER: B

Preemptive Shortest Job First scheduling is sometimes called :
a) Fast SJF scheduling
b) EDF scheduling – Earliest Deadline First
c) HRRN scheduling – Highest Response Ratio Next
d) SRTN scheduling – Shortest Remaining Time Next
ANSWER: D

An SJF algorithm is simply a priority algorithm where the priority is :
a) the predicted next CPU burst
b) the inverse of the predicted next CPU burst
c) the current CPU burst
d) anything the user wants
ANSWER: C

8. ‘Aging’ is :
a) keeping track of cache contents
b) keeping track of what pages are currently residing in memory
c) keeping track of how many times a given page is referenced
d) increasing the priority of jobs to ensure termination in a finite time
ANSWER: D

A solution to the problem of indefinite blockage of low – priority processes is :
a) Starvation
b) Wait queue
c) Ready queue
d) Aging
ANSWER: D

Which of the following scheduling algorithms gives minimum average waiting time ?
a) FCFS
b) SJF
c) Round – robin
d) Priority
ANSWER: B

Advance operating system and compiler design

Which of the following system software resides in main memory always?
a. Text editor
b. Assembler
c. Linker
d. Loader
Answer: d

Daisy chain is a device for
a. Interconnecting a number of devices to number of controllers
b. Connecting a number of devices to a controller
c. Connecting a number of controller to devices
d. All of above
Answer: b

Producer consumer problem can be solved using
a. semaphores
b. event counters
c. monitors
d. all of above
Answer: d

What is bootstraping? 
a. A language interpreting other language program
b. A language compiling other language program
c. A language compile itself
d. All of above
Answer: c

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
Answer: d

Which of the following program is not a utility?
a. Debugger
b. Editor
c. Spooler
d. All of the above
Answer: c

A development stategy whereby the executive control modules of a system are coded and tested first, is known as
a. Bottom-up development
b. Top-down development
c. Left-Right development
d. All of the above
Answer: b

Systems software is a program that directs the overall operation of the computer, facilitates its use and interacts with the users. What are the different types of this software?
a. Operating system
b. Languages
c. Utilities
d. All of the above
Answer: d

The Process Manager has to keep track of:
a. the status of each program
b. the priority of each program
c. the information management support to a programmer using the system
d. both a and b
Answer: d

A sequence of instructions, in a computer language, to get the desired result, is known as
a. Algorithm
b. Decision Table
c. Program
d. All of the above
Answer: c

Running time of a program depends on
a. The way the registers and addressing modes are used
b. The order in which computations are performed
c. The usage of machine idioms
d. All of these
Answer: d

Object program is a
a. Program written in machine language
b. Program to be translated into machine language
c. Translation of high-level language into machine language
d. None of the mentioned
Answer: c

Programs that coordinate computer resources, provide an interface between users and the computer, and run applications are called
a. utilities
b. operating systems
c. device drivers
d. language translators
Answer: b

Specialized programs that allow particular input or output devices to communicate with the rest of the computer system are called
a. operating systems
b. utilities
c. device drivers
d. language translators
Answer: c

Also known as a service program, this type of program performs specific tasks related to managing computer resources.
a. utility
b. operating system
c. language translator
d. device driver
Answer: a

The items that a computer can use in its functioning are collectively called its
a. resources
b. stuff
c. capital
d. properties
Answer: a

Programs that coordinate all of the computer’s resources including memory, processing, storage, and devices such as printers are collectively referred to as
a. language translators
b. resources
c. applications
d. interfaces
Answer: b

The object code is then passed through a program called a ___________ which turns it into
an executable program.
a. Integer
b. Source code
c. Linker
d. None of the above
Answer: c

Software that measures, monitors, analyzes and controls real world events is called
a. System software
b. Business software
c. Scientific software
d. Real time software
Answer: d

In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun ?
a. Serially usable
b. Re-entrable module
c. Non reusable module
d. None of these
Answer: b

System generation
a. is always quite simple
b. is always very difficult
c. varies in difficulty between systems
d. requires extensive tools to be understandable
Answer: d

Which of the following system program foregoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly ?
a. Macro processor
b. Load and go assembler
c. Two pass assembler
d. Compiler
Answer: b

Translator for low level programming language were termed as
a. Assembler
b. Compiler
c. Linker
d. Loader
Answer: a

Assembler is a machine dependent, because of?
a. Macro definition table(MDT)
b. Pseudo operation table(POT)
c. Argument list array(ALA)
d. Mnemonics operation table(MOT)
Answer: d

The assembler stores all the names and their corresponding values in ______ .
a. Special purpose Register
b. Symbol Table
c. Value map Set
d. None of the above
Answer: b

In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with
a. creation of more optical matrix
b. recognition of basic elements and creation of uniform symbols
c. use of macro-processor to produce more optimal assembly code
d. recognization of basic syntactic construction through reductions
Answer: a

In analyzing the compilation of PL/I program the description " resolving symbolic address ( lables ) and generating machine language " is associated with
a. syntax analysis
b. code generation
c. storage assignment
d. assembly and output
Answer: d

Which of the following translation program converts assembly language programs to object program
a. Loader
b. Compiler
c. Assembler
d. Macroprocessor
Answer: c

Loop is a collection of nodes that is
a. strongly connected and has a unique entry
b. loosely connected and has a unique entry
c. strongly connected
d. none of these
Answer: a

Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be  executed immediately upon completion of the assembly?
a. compiler
b. macroprocessor
c. two pass assembler
d. load-and-go assembler
Answer: d

Which of the following is not a feature of compiler ?
a. Execution time is more
b. When all the syntax errors are removed execution takes place
c. Scans the entire program first and then translate it into machine code
d. slow for debugging
Answer: a

In distributed system, each processor has its own ___________
a) local memory
b) clock
c) both local memory and clock
d) none of the mentioned
Answer: c

If one site fails in distributed system then ___________
a) the remaining sites can continue operating
b) all the sites will stop working
c) directly connected sites will stop working
d) none of the mentioned
Answer: a

Which technique is based on compile-time program transformation for accessing remote data in a distributed-memory parallel system?
a) cache coherence scheme
b) computation migration
c) remote procedure call
d) message passing
Answer: b

Processes on the remote systems are identified by ___________
a) host ID
b) host name and identifier
c) identifier
d) process ID
Answer: b

In distributed systems, link and site failure is detected by ___________
a) polling
b) handshaking
c) token passing
d) none of the mentioned
Answer: b

The capability of a system to adapt the increased service load is called ___________
a) scalability
b) tolerance
c) capacity
d) none of the mentioned
Answer: a

What is not true about distributed system ?
a. It is a collection of processor
b. All processors are synchronized
c. They do not share memory
d. None of the mentioned
Answer: b

What are characteristics of processor in distributed system ?
a. They vary in size and function
b. They are same in size and function
c. They are manufactured with single purpose
d. They are real-time devices
Answer: a

What are characteristics of distributed file system ?
a. Its users, servers and storage devices are dispersed
b. Service activity is not carried out across the network
c. They have single centralized data repository
d. There are multiple dependent storage devices
Answer: a

What is not a major reason for building distributed systems ?
a. Resource sharing
b. Computation speedup
c. Reliability
d. Simplicity
Answer: d

What are characteristic of Network Operating Systems ?
a. Users are aware of multiplicity of machines
b. They are transparent
c. They are simple to use
d. All of the mentioned
Answer: a

How are access to resources of various machines is done ?
a. Remote logging using ssh or telnet
b. Zone are configured for automatic access
c. FTP is not used
d. All of the mentioned
Answer: a

What are characteristics of Distributed Operating system ?
a. Users are aware of multiplicity of machines
b. Access is done like local resources
c. Users are aware of multiplicity of machines
d. They have multiple zones to access files
Answer: b

What are characteristics of computation migration ?
a. transfer data by entire file or immediate portion required
b. transfer the computation rather than the data
c. execute an entire process or parts of it at different sites
d. none of the mentioned
Answer: b

What are characteristics of process migration ?
a. transfer data by entire file or immediate portion required
b. transfer the computation rather than the data
c. execute an entire process or parts of it at different sites
d. none of the mentioned
Answer: b

What is common problem found in distributed system ?
a. Process Synchronization
b. Communication synchronization
c. Deadlock problem
d. Power failure
Answer: c

What are the different ways in which clients and servers are dispersed across machines ?
a. Servers may not run on dedicated machines
b. Servers and clients can be on same machines
c. Distribution cannot be interposed between a OS and the file system
d. OS cannot be distributed with the file system a part of that distribution
Answer: b

______ of the distributed file system are dispersed among various machines of distributed system.
a. Clients
b. Servers
c. Storage devices
d. All of the mentioned
Answer: d

_______ is not possible in distributed file system.
a. File replication
b. Migration
c. Client interface
d. Remote access
Answer: b

Which one of the following hides the location where in the network the file is stored?
a. transparent distributed file system
b. hidden distributed file system
c. escaped distribution file system
d. spy distributed file system
Answer: a

In distributed file system, when a file’s physical storage location changes
a. file name need to be changed
b. file name need not to be changed
c. file’s host name need to be changed
d. file’s local name need to be changed
Answer: b

In distributed file system, _______ is mapping between logical and physical objects.
a. client interfacing
b. naming
c. migration
d. heterogeneity
Answer: b

In distributed file system, a file is uniquely identified by
a. host name
b. local name
c. the combination of host name and local name
d. none of the mentioned
Answer: b

For proper synchronization in distributed systems
a. prevention from the deadlock is must
b. prevention from the starvation is must
c. prevention from the deadlock & starvation is must
d. none of the mentioned
Answer: c

Some code optimizations are carried out on the intermediate code because
A. they enhance the portability of the compiler to other target processors
B. program analysis is more accurate on intermediate code than on machine code
C. the information from dataflow analysis cannot otherwise be used for optimization
D. the information from the front end cannot otherwise be used for optimization
Answer: A

One of the purposes of using intermediate code in compilers is to
A. make parsing and semantic analysis simpler.
B. improve error recovery and error reporting.
C. increase the chances of reusing the machine-independent code optimizer in other compilers.
D. improve the register allocation.
Answer: C

The method which merges the bodies of two loops is
a) Loop rolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
Answer: b

The process manager has to keep track of
a) Status of each program
b) Information to a programmer using the system
c) Both of the mentioned
d) None of the mentioned
Answer: c

Which of the following functions is performed by loader?
a) Allocate memory for the programs and resolve symbolic references between objects decks
b) Address dependent locations, such as address constants, to correspond to the allocated space
c) Physically place the machine instructions and data into memory
d) All of the mentioned
Answer: d

Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0.
Answer: d

A linker is given object module for a set of programs that were compiled separately. What is not true about an object module
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols
Answer: d

In which way a macro processor for assembly language can be implemented?
a) Independent two-pass processor
b) Independent one-pass processor
c) Processor put into pass 1 of a standard two pass assembler
d) All of the mentioned
Answer: d

Local and loop optimization in turn provide motivation for
A. data flow analysis
B. constant folding
C. peep hole optimization
D. DFA and constant folding
Answer: A

A compiler for a high-level language that runs on one machine and produces code for a different machine is called
A. optimizing compiler
B. one pass compiler
C. cross compiler
D. multipass compiler
Answer: C

The optimization technique which is typically applied on loops is
A. removal of invariant computation
B. peephole optimization
C. constant folding
D. all of these
Answer: D

In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with
A. recognization of basic syntactic construction through reductions
B. recognition of basic elements and creation of uniform symbols
C. creation of more optical matrix
D. use of macro-processor to produce more optimal assembly code
Answer: C

In an aboslute loading scheme, which loader function is accomplished by programmer?
A. Allocation
B. LInking
C. Reallocation
D. both (A) and (B)
Answer: D

Advantage of incorporating the macro-processor into pass 1 is that
a) Many functions have to be implemented twice
b) Functions are combined not necessarily creating intermediate files as output from the macro-processor and input to the assembler
c) More flexibility is provided to the programmer in that he may use all the features of the assembler in conjunction with macros
d) All of the mentioned
Answer: d

System program such a s compiler are designed so that they are
a) Re-enterable
b) Non reusable
c) Serially usable
d) None of the mentioned
Answer: a

Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly?
a) Two pass assembler
b) Load and go assembler
c) Macro processor
d) Linker
Answer: b

The specific task storage manager performs
a) Allocation/ deal location of programs
b) Protection of storage area assigned to the program
c) Both of the mentioned
d) None of the mentioned
Answer: c

Disadvantage of ” Compile and GO ” loading scheme is that
a) Memory is wasted because the case occupied by the assembler is unavailable to the object program
b) Necessary to translate the users program
c) It is very difficult to handle multiple segments, even when the source programs are in different languages and to produce orderly modular programs
d) All of the mentioned
Answer: d

Function of the storage assignment is
a) Assign storage to all variables referenced in the source program
b) Assign storage to all temporary locations that are necessary for intermediate results
c) Assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
d) All of the mentioned
Answer: d

Generation of intermediate code based on a abstract machine model is useful in compilers because
a) Implementation of lexical analysis and syntax analysis is made easier
b) Writing for intermediate code generation
c) Portability of the front end of the compiler
d) None of the mentioned
Answer: a

An optimizer Compiler
a) Is optimized to occupy less space
b) Both of the mentioned
c) Optimize the code
d) None of the mentioned
Answer: d

Pee Hole optimization
a) Loop Optimization
b) Local Optimization
c) Constant folding
d) Data Flow analysis
Answer: c

The optimization which avoids test at every iteration is
a) Loop unrolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
Answer: a

Some code optimizations are carried out on the intermediate code because
a) They enhance the portability of the complier to other target processors
b) Program analysis is name accurate on intermediate code than on machine code
c) The information from data flow analysis cannot otherwise be used for optimization
d) The information from the front end cannot otherwise be used for optimization
Answer: b

What data structure in a complier is used for managing information about variables and their attributes?
a) Abstract syntax tree
b) Symbol table
c) Semantic stack
d) Parse table
Answer: b

Which languages necessarily need heap allocation in the runtime environment?
a) Those that support recursion
b) Those that use dynamic scoping
c) Allow dynamic data structure
d) Those that use global variables
Answer: c

_________ or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.
a) Lexical
b) Diversion
c) Modelling
d) None of the mentioned
Answer: a

Which of the following is used for grouping of characters into tokens?
a) Parser
b) Code optimization
c) Code generator
d) Lexical analyzer
Answer: d

The lexical analyzer takes _________as input and produces a stream of _______as output.
a) Source program, tokens
b) Token, source program
c) Either A and B
d) None of the mentioned
Answer: a

The action of parsing the source program into proper syntactic classes is called
a) Syntax analysis
b) Lexical analysis
c) Interpretation analysis
d) General syntax analysis
Answer: b

Pick the machine independent phase of the compiler
a) Syntax analysis
b) Code generation
c) Lexical analysis
d) A, C and D
Answer: d

A system program that combines the separately compiled modules of a program into a form suitable for execution
a) Assembler
b) Linking loader
c) Cross compiler
d) Load and Go
Answer: b

Loading process can be divided into two programs. The first is binder the other is
a) Linkage editor
b) Module Loader
c) Relocate
d) None of the mentioned
Answer: b

Non modifiable procedures are called
a) Concurrent procedures
b) Serially usable procedures
c) Re-entrant procedures
d) Top down procedures
Answer: b

Which is not true about syntax and semantic parts of a computer language?
a) Semantics is checked mechanically by a computer
b) Semantics is the responsibility of the programmer
c) All of the mentioned
d) None of the mentioned
Answer: d

The identification of common sub-expression and replacement of run-time computations by compile-time computations is
a) Local optimization
b) Loop optimization
c) Constant folding
d) Data flow analysis
Answer: c

The graph that shows basic blocks and their successor relationship is called
a) Dag
b) Flow Graph
c) Control Graph
d) Hamilton Graph
Answer: b

The specific task storage manager performs
a) Allocation/ deal location of programs
b) Protection of storage area assigned to the program
c) Both of the mentioned
d) None of the mentioned
Answer: c

In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun?
a) Non usable module
b) Serially usable
c) Re-enter-able
d) None of the mentioned
Answer: c

Dividing a project into segments and smaller units in order to simplify design and programming efforts is called
a) Modular approach
b) Top down approach
c) Bottom up approach
d) Left right approach
Answer: a

Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0
Answer: d

A linker is given object module for a set of programs that were compiled separately. What is not true about an object module
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols
Answer: d

____________ refer to renewing or changing components like increasing the main memory, or hard disk capacities, or adding speakers, or modems, etc.
a) Grades
b) Prosody
c) Synthesis
d) Upgrades
Answer: d

From the following statements which one is not a valid deadlock prevention scheme?
a. Number the resources uniquely and never request a lower numbered resource than the last one
b. Release all the resources before requesting for a new resource
c. Request all the resources before execution
d. Never request a resource after releasing any resources
Answer: d

The main function of the command interpreter is
a. To handle the compiler.
b. To handle the parser.
c. To get and execute the next user-specified command.
d. None of the above.
Answer: c

Which technique is used to temporarily removing non-active programs from the memory of computer system?
a. Swapping
b. Spooling
c. Scheduler
d. None of the above.
Answer: a

How you will describe Throughput in operating system?
a. Number of times a program produces output.
b. Number of times the program is running.
c. Number of programs processed by it per unit time
d. None of the above.
Answer: c

Tuesday, June 02, 2020

CHOMSKY HIERARCHY FOR FORMAL LANGUAGES IN THEORY OF COMPUTATION


SN

FORMAL
LANGUAGE

LANGUAGE
EXAMPLE

FORMAL
GRAMMAR

GRAMMAR
DEFINITION

TYPE

AUTOMATA
/MACHINE

TYPE OF AUTO
MATA/MACHINE

MACHINE
DEFINITION

#TUPLE

#PARAMETER
 IN δ

#COMPONENT
IN MACHINE

MACHINE
COMPONENT

1

REGULAR
LANGUAGE (RL)

L={an|n>=1}

REGULAR
GRAMMAR
(RG)

S->aS
S->a
S->ε

TYPE - 3

FINITE
STATE
AUTOMATA
(FSA)

1. DETERMINISTIC
FSA
2. NON-
DETERMINISTIC
FSA

Q - SET OF
STATES
Σ - SET OF
INPUTS
q0 - INITIAL
STATE
F - FINAL
STATE (S)
δ - TRANSITION
FUNCTION

5

2/1

3

1. INPUT TAPE
2. READ HEAD
3. FINITE
CONTROL

2

CONTEXT
FREE
LANGUAGE
(CFL)

L={anbn|n>=1}

CONTEXT
FREE
GRAMMAR
(CFG)

S->aSb
S->ε

TYPE - 2

PUSH
DOWN
AUTOMATA
(PDA)

1. DETERMINISTIC
PDA
2. NON-
DETERMINISTIC
PDA

Q - SET OF
STATES
Σ - SET OF
INPUTS
Γ - STACK
SYMBOL
q0 - INITIAL
STATE
F - FINAL
STATE (S)
δ - TRANSITION
FUNCTION

6

2/3

5

1. INPUT TAPE
2. READ HEAD
3. FINITE
CONTROL
4. STACK
5. STACK
TOP

3

CONTEXT
SENSITIVE
LANGUAGE
(CSL)

L={anbncn|n>=1}

CONTEXT
SENSITIVE
GRAMMAR
(CSG)

S->aSb
Sa->ABC
aS->AbC
BS->abc


|α|<=|β|

TYPE - 1

LINEAR
BOUNDED
AUTOMATA
(LBA)

1. DETERMINISTIC
LBA
2. NON-
DETERMINISTIC
LBA

Q - SET OF
STATES
Σ - SET OF
INPUTS
Γ - STACK
SYMBOL
q0 - INITIAL
STATE
F - FINAL
STATE (S)
# - BLANK
SPACE
< - LEFT END
MARKER
> - RIGHT END
MARKER
δ - TRANSITION
FUNCTION

9

2/3

5

1. INPUT TAPE
2. READ HEAD
3. FINITE
CONTROL
4. R/W HEAD
5. WORKING
TAPE

4

RECURSIVE
ENUMERABLE
LANGUAGE
(REL)

 

RECURSIVE
ENUMERABLE
GRAMMAR
(REG)

S-> ACaB
CaBc->aaC
aD->DB
AE->ε

TYPE - 0

TURING
MACHINE

1. DETERMINISTIC TM
2. NON-
DETERMINISTIC TM
3. SINGLE TAPE TM
4. MULTITAPE TM
5. TWO WAY
INFINITE TM
6. UNIVERSAL TM

Q - SET OF
STATES
Σ - SET OF
INPUTS
Γ - STACK
SYMBOL
q0 - INITIAL
STATE
h - HALTING
STATE
# - BLANK
SPACE
δ - TRANSITION
FUNCTION

7

2/3

3

1. INPUT TAPE
2. R/W HEAD
3. FINITE
CONTROL


Search Aptipedia