Computer Science Previous Year Questions (page 11)
570 Computer Science questions asked in UGC NET previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Q501UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider the graph given below (edges with weights):
A-C = 6, A-E = 4, A-D = 2, A-G = 3, C-G = 2, C-F = 5, C-B = 4,
D-E = 5, D-G = 4, D-B = 4, G-B = 3, B-F = 4
Use Kruskal's algorithm to find a minimal spanning tree for the graph. The list of edges of the tree in the order in which they are choosen it?
AAD, AE, AG, GC, GB, BF
BGC, GB, BF, GA, AD, AE
CGC, AD, GB, GA, BF, AE
DAD, AG, GC, AE, GB, BF
Show answerHide answer
Correct answer: (C) GC, AD, GB, GA, BF, AE
Explanation
Kruskal's algorithm picks edges in increasing order of weight while avoiding cycles: GC = 2, AD = 2, GB = 3, GA = 3, then BF = 4 and AE = 4. So the order is GC, AD, GB, GA, BF, AE. Note: more than one order is possible since edge weights are repeated.
Q502UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Let G be an undirected connected graph with distinct edge weight. Let Eₘₐₓ be the edge with maximum weight and Eₘᵢₙ the edge with minimum weight. Which of the following statements is false?
AEvery minimum spanning tree of G must contain Eₘᵢₙ
BIf Eₘₐₓ is in minimum spanning tree, then its removal must disconnect G.
CNo minimum spanning tree contains Eₘₐₓ
DG has a unique minimum spanning tree
Show answerHide answer
Correct answer: (C) No minimum spanning tree contains Eₘₐₓ
Explanation
With distinct edge weights the MST is unique and always contains Eₘᵢₙ. Eₘₐₓ can be in the MST (when it is a bridge, its removal disconnects G), so the statement "No minimum spanning tree contains Eₘₐₓ" is false.
Q503UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In distributed system, the capacity of a system to adapt the increased service load is called_____
ATolerance
BScalability
CCapability
DLoading
Show answerHide answer
Correct answer: (B) Scalability
Explanation
Scalability is the ability of a process, network, software or organization to grow and manage increased demand. A scalable system can adapt to the changing needs of its users.
Q504UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In _____ disk scheduling algorithm, the disk head moves from one end to other end of the disk, serving the request along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without serving any requests on the return trip.
ALOOK
BSCAN
CC – LOOK
Dc – SCAN
Show answerHide answer
Correct answer: (B) SCAN
Explanation
Note: returning to the beginning without serving requests on the return trip is the defining feature of C-SCAN (option d); the book keys (b). In the SCAN disk scheduling algorithm (as keyed by the book), the disk head moves from one end of the disk to the other, serving requests along the way, and then returns to the beginning without serving requests on the return trip.
Q505UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Suppose there are six files F1, F2, F3, F4, F5, F6 with corresponding sizes 150 KB, 225 KB, 75 KB, 60 KB, 275 KB and 65 KB respectively. The files are to be stored on a sequential device in such a way that optimizes access time. In what order should the files be stored?
AF5, F2, F1, F3, F6, F4
BF4, F6, F3, F1, F2, F5
CF1, F2, F3, F4, F5, F6
DF6, F5, F4, F3, F2, F1
Show answerHide answer
Correct answer: (B) F4, F6, F3, F1, F2, F5
Explanation
To minimise access time on a sequential device, store files in increasing order of size: F4 (60 KB), F6 (65 KB), F3 (75 KB), F1 (150 KB), F2 (225 KB), F5 (275 KB).
Q506UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which module gives control of the CPU to the process selected by the sort - term scheduler?
ADispatcher
BInterrupt
CScheduler
DThreading
Show answerHide answer
Correct answer: (A) Dispatcher
Explanation
The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler.
Q507UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Two atomic operations permissible on Semaphores are _____ and _____
AWait, stop
BWait, hold
CHold, signal
DWait, signal
Show answerHide answer
Correct answer: (D) Wait, signal
Explanation
Wait & signal operations are the two atomic operations performed on a semaphore.
Q508UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In RDBMS, different classes or relations are created using ______ technique to prevent modification anomalies.
AFunctional dependencies
BData integrity
CReferential integrity
DNormal forms
Show answerHide answer
Correct answer: (D) Normal forms
Explanation
Relations are decomposed into normal forms (normalization) to prevent insertion, deletion and update anomalies.
Q509UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
______ SQL command changes one or more fields in a record.
ALOOK-UP
BINSERT
CMODIFY
DCHANGE
Show answerHide answer
Correct answer: (C) MODIFY
Explanation
As keyed by the book, MODIFY is the SQL command that changes one or more fields in a record.
Q510UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is/are true with reference to 'view' in DBMS?
(A) A 'view' is a special stored procedure executed when certain event occurs
(B) A 'view' is a virtual table, which occurs after executing a pre-complied query.
Code :
AOnly (A) is true
BOnly (B) is true
CBoth (A) and (B) are true
DNeither (A) nor (B) are true
Show answerHide answer
Correct answer: (B) Only (B) is true
Explanation
A view is a virtual table through which a selective portion of the data from one or more tables can be seen; it does not contain data of its own. A stored procedure executed when an event occurs is a trigger, not a view. So only (B) is true.
Q511UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In SQL ______is an Aggregate function.
ASELECT
BCREATE
CAVG
DMODIFY
Show answerHide answer
Correct answer: (C) AVG
Explanation
AVG returns the average of the values in a group, ignoring null values. It is an aggregate function. Syntax: AVG([ALL | DISTINCT] expression).
Q512UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the following with respect to RDBMS :
A. Entity integrity
B. Domain integrity
C. Referential integrity
D. User defined integrity
i. Enforces some specific business rule that to not fall into entity or domain
ii. Rows can't be deleted which are used by other records
iii. Enforces valid entries for a column
iv. No duplicate rows in a table
Code :
A B C D
Aiii iv i ii
Biv iii ii i
Civ ii iii i
Dii iii iv i
Show answerHide answer
Correct answer: (B) iv iii ii i
Explanation
Entity integrity - no duplicate rows in a table (iv); Domain integrity - enforces valid entries for a column (iii); Referential integrity - rows can't be deleted which are used by other records (ii); User defined integrity - enforces specific business rules that do not fall into entity or domain integrity (i).
Q513UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
______ do not take their decisions on measurements or estimates of the current traffic and topology.
AStatic algorithm
BAdaptive algorithm
CNon-adaptive algorithm
DRecursive algorithm
Show answerHide answer
Correct answer: (C) Non-adaptive algorithm
Explanation
Non-adaptive (static) routing algorithms do not base their routing decisions on measurements or estimates of the current traffic and topology. Instead, the route from one node to another is computed in advance.
Q514UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following layer of OSI Reference model is also called End-to-End layer?
ANetwork layer
BDatalink layer
CSession layer
DTransport layer
Show answerHide answer
Correct answer: (D) Transport layer
Explanation
The transport layer is responsible for end-to-end communication over a network; it provides logical communication between application processes running on different hosts.
Q515UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following devices takes data sent from one network device and forwards it to the destination node based on MAC address?
AHub
BModem
CSwitch
DGateway
Show answerHide answer
Correct answer: (C) Switch
Explanation
Switch takes data sent from one network device & forwards it to the destination node based on MAC address. A switch is a multi port bridge with a buffer and a design that can boost its efficiency and performance. Switch is data link layer device. It can perform error checking before forwarding data.
Q516UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The number of bits used for addressing in Gigabit Ethernet is ______
A32 bits
B48 bits
C64 bits
D128 bits
Show answerHide answer
Correct answer: (B) 48 bits
Explanation
Gigabit Ethernet uses the standard Ethernet frame, whose destination and source address (MAC address) fields are each 48 bits long.
Q517UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The IP address ______ is used by hosts when they are being booted.
A0.0.0.0
B1.0.0.0
C1.1.1.1
D255.255.255.255
Show answerHide answer
Correct answer: (A) 0.0.0.0
Explanation
The address 0.0.0.0 is used by a host as its source address while it is booting (e.g. in a DHCP request) before it knows its own IP address.
Q518UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Software not wear-out in the traditional sense of the term, but software does tend to deteriorate as it evolves, because :
ASoftware suffers from exposure to hostile environments
BDefects are more likely to arise after software has been used often
CMultiple change requests introduce errors in component interactions
As software is used, it receives multiple change requests; each change can introduce errors in component interactions, so the software deteriorates over time.
Q519UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Software re-engineering is concerned with :
ARe-constructing the original source code from the existing machine (low - level) code program and modifying it to make it more user - friendly
BScrapping the source code of a software and re-writing it entirely from scratch
CRe-organizing and modifying existing software systems to make then more maintainable
DTranslating source code of an existing software to a new machine (low - level) language
Show answerHide answer
Correct answer: (C) Re-organizing and modifying existing software systems to make then more maintainable
Explanation
Software re-engineering is a process of software development which is done to improve the maintainability of a software system.
Q520UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not a key issue stressed by an agile philosophy of software engineering?
AThe importance of self-organizing teams as well as communication and collaboration between team members and customers
BRecognition that change represents opportunity
CEmphasis on rapid delivery of software that satisfies the customer
DHaving a separate testing phase after a build phase
Show answerHide answer
Correct answer: (D) Having a separate testing phase after a build phase
Explanation
Agile philosophy stresses self-organizing teams, collaboration with customers, welcoming change and rapid delivery of working software. Testing is done continuously along with development, not as a separate phase after the build phase.
Q521UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
What is the normal order of activities in which traditional software testing is organized ?
(A) Integration Testing
(B) System testing
(C) Unit Testing
(D) Validation Testing
Code :
A(C), (A), (B), (D)
B(C), (A), (D), (B)
C(D), (C), (B), (A)
D(B), (D), (A), (C)
Show answerHide answer
Correct answer: (A) (C), (A), (B), (D)
Explanation
Traditional testing starts with unit testing, followed by integration testing, then system testing and finally validation (acceptance) testing: (C), (A), (B), (D).
Q522UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following testing techniques ensures that the software product runs correctly after the changes during maintenance?
APath Testing
BIntegration Testing
CUnit Testing
DRegression Testing
Show answerHide answer
Correct answer: (D) Regression Testing
Explanation
Regression testing verifies that previously developed and tested software still performs correctly after it has been changed, e.g. after enhancements or patches during maintenance.
Q523UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not correct for virtual function in C++?
AMust be declared in public section of class
BVirtual function can be static
CVirtual function should be accessed using pointers
DVirtual function is defined in base class
Show answerHide answer
Correct answer: (B) Virtual function can be static
Explanation
A virtual function cannot be static, because a virtual function is a non-static member function whose call is resolved through a specific object at run time.
Q524UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not correct (in C++)?
AClass templates and function templates are instantiated in the same way
BClass templates differ from function templates in the way they are initiated
CClass template is initiated by defining an object using the template argument
DClass templates are generally used for storage classes
Show answerHide answer
Correct answer: (A) Class templates and function templates are instantiated in the same way
Explanation
Function templates are instantiated implicitly when the function is called with arguments, whereas class templates are instantiated by defining an object with explicit template arguments. So class templates and function templates are not instantiated in the same way; statement (a) is not correct.
Q525UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The associativity of which of the following operators is left to right, in C++?
AUnary Operator
BLogical not
CArray element access
DAddress of
Show answerHide answer
Correct answer: (C) Array element access
Explanation
Only array element access ([]) is left-to-right associative among the options listed. All others are unary operators and are right-to-left associative.
Q526UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
A member function can always access the data in ______ , (in C++)
Athe class of which it is member
Bthe object of which it is a member
Cthe public part of its class
Dthe private part of its class
Show answerHide answer
Correct answer: (A) the class of which it is member
Explanation
A member function can always access all the data (public, private and protected) of the class of which it is a member.
Q527UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
'ptrdata' is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++):
A*(ptrdata++)
B(*ptrdata)++
C*(ptrdata)++
DDepends on compiler
Show answerHide answer
Correct answer: (A) *(ptrdata++)
Explanation
Postfix ++ has higher precedence than *, so *ptrdata++ is evaluated as *(ptrdata++): the value at ptrdata is used and then the pointer moves to the next location. (*ptrdata)++ would instead increment the value stored at that location.
Q528UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the given wireless technologies used in IoT, consumes the least amount of power?
AZigbee
BBluetooth
CWi-Fi
DGSM/CDMA
Show answerHide answer
Correct answer: (B) Bluetooth
Explanation
As keyed by the book, Bluetooth (in its low-energy form) consumes the least power among the options; Wi-Fi and GSM/CDMA consume much more.
Q529UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the description of several parts of a classic optimizing compiler in List-I, with the names of those parts in List - II :
List-I
A. A part of a compiler that is responsible for recognizing syntax
B. A part of a complier that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories
C. A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions.
D. An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate Representation)
List-II
i. Optimizer
ii. Semantic Analysis
iii. Parser
iv. Scanner
Code :
A B C D
Aiii iv ii i
Biv iii ii i
Cii iv i iii
Dii iv iii i
Show answerHide answer
Correct answer: (A) iii iv ii i
Explanation
The parser (syntax analyzer) recognizes syntax (A-iii); the scanner (lexical analyzer) turns the character stream into words/tokens (B-iv); the semantic analyzer checks meanings and consistent use of names (C-ii); the optimizer is an IR-to-IR transformer that improves the IR program (D-i).
Q530UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following Super Computers in the fastest Super Computer?
ASun-way Taihu Light
BTitan
CPiz Daint
DSequoria
Show answerHide answer
Correct answer: (A) Sun-way Taihu Light
Explanation
Sunway TaihuLight was named the world's fastest supercomputer in the TOP500 list at that time. It was developed by China's National Research Center of Parallel Computer Engineering & Technology (NRCPC).
Q531UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following statements about ERP system is true?
BERP software package are themselves combinations of separate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry
CIntegration of ERP systems can be achieved in only one way
DAn ERP package implemented uniformly throughout an enterprise is likely to contain very flexible connections to allow charges and software variations.
Show answerHide answer
Correct answer: (B) ERP software package are themselves combinations of separate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry
Explanation
ERP software packages are themselves combinations of separate applications for manufacturing, materials resource planning, general ledger, human resources, procurement and order entry.
Q532UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not a clustering method?
AK–Mean method
BSelf Organizing feature map method
CK – nearest neighbor method
DAgglomerative method
Show answerHide answer
Correct answer: (C) K – nearest neighbor method
Explanation
K-means, self-organizing feature maps and agglomerative methods are clustering methods. The k-nearest neighbour (K-NN) algorithm is a non-parametric method used for classification and regression, not clustering.
Q533UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following regular expressions, each describing a language of binary numbers (MSB to LSB) that represents non-negative decimal values, does not include even values?
Where {+, *} are quantification characters.
A0*1+0*1*
B0*10+1*
C0*1*0*1+
D0*1*0*1*
Show answerHide answer
Correct answer: (C) 0*1*0*1+
Explanation
Odd binary numbers end with 1 in the LSB and even numbers end with 0. Only 0*1*0*1+ always ends with at least one 1, so its language contains no even values.
Q534UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
A micro-instruction format has micro-ops field which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations. The size of micro-instruction is :
A17 bits
B20 bits
C24 bits
D32 bits
Show answerHide answer
Correct answer: (B) 20 bits
Explanation
F1, F2, F3 each with 7 micro-operations need 3 bits each = 9 bits; CD for 4 status bits needs 2 bits; BR with 4 options needs 2 bits; ADF for 128 locations needs 7 bits. Total = 9 + 2 + 2 + 7 = 20 bits.
Q535UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is correct statement?
AIn memory-mapped I/O, the CPU can manipulate I/O data residing in interface registers that are not used to manipulate memory words
BThe isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment
CIn asynchronous serial transmission of data the two units share a common clock
DIn synchronous serial transmission of data two units have different clocks
Show answerHide answer
Correct answer: (B) The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment
Explanation
The isolated I/O method isolates memory and I/O addresses so that the memory address range is not affected by interface address assignment. Memory-mapped I/O uses the same address space for memory and I/O devices. In asynchronous serial transfer the two units do not share a common clock; in synchronous serial transfer they do.
Q536UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In 8085 microprocessor which of the following flag(s) is (are) affected by an arithmetic operation?
AAC flag only
BCY flag only
CZ flag only
DAC, CY, Z flags
Show answerHide answer
Correct answer: (D) AC, CY, Z flags
Explanation
AC is the auxiliary carry flag, CY is the carry flag and Z is the zero flag. All these flags are affected by arithmetic operations.
Q537UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In 8085 microprocessor the address bus is of .......... bits
A4
B8
C16
D32
Show answerHide answer
Correct answer: (C) 16
Explanation
The 8085 microprocessor has a 16-bit address bus, so 2¹⁶ = 65,536 different memory locations can be addressed.
Q538UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In the architecture of 8085 microprocessor match the following :
A. Processing unit
B. Instruction unit
C. Storage and Interface unit
i. Interrupt
ii. General purpose Register
iii. ALU
iv. Timing and control
Code :
A B C
Aiv i ii
Biii iv ii
Cii iii i
Di ii iv
Show answerHide answer
Correct answer: (B) iii iv ii
Explanation
The ALU forms the processing unit (A-iii); timing and control belongs to the instruction unit (B-iv); the general-purpose registers are in the storage and interface unit (C-ii).
Q539UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following addressing mode is best suited to access elements of an array of contiguous memory locations?
AIndexed addressing mode
BBase Register addressing mode
CRelative address mode
DDisplacement mode
Show answerHide answer
Correct answer: (A) Indexed addressing mode
Explanation
Indexed addressing mode is best suited for accessing an array in contiguous memory location.
Q540UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf. Which of the following is correct for the full binary tree?
Ae = i + n
Be = i + 2n
Ce = 2i + n
De = 2ⁿ + i
Show answerHide answer
Correct answer: (B) e = i + 2n
Explanation
For a full binary tree with n internal nodes, e = i + 2n. Example: a full binary tree with 7 internal nodes of depth up to 2 has i = 0 + 1×2 + 2×4 = 10 and 8 leaves at depth 3, so e = 24 = 10 + 2×7.
Q541UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Standard planning algorithms assume environment to be...............
ABoth deterministic and fully observable
BNeither deterministic nor fully observable
CDeterministic but not fully observable
DNot deterministic but fully observable
Show answerHide answer
Correct answer: (A) Both deterministic and fully observable
Explanation
Standard planning algorithms assume the environment to be both deterministic and fully observable.
Q542UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
If b is the branding factor and m is the maximum depth of the search tree, what is the space complexity of greedy search?
AO(b + m)
BO(bm)
CO(bᵐ)
DO(mᵇ)
Show answerHide answer
Correct answer: (C) O(bᵐ)
Explanation
In the worst case greedy (best-first) search keeps all generated nodes in memory. With branching factor b and maximum depth m, the space complexity is O(bᵐ).
Q543UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Heap allocation is required for languages that :
Ause dynamic scope rules
Bsupport dynamic data structures
Csupport recursion
Dsupport recursion and dynamic data structures
Show answerHide answer
Correct answer: (B) support dynamic data structures
Explanation
Heap allocation is required for languages that support dynamic data structures, whose storage is allocated and freed at run time in an arbitrary order.
Q544UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Find the equation of the circle x² + y² = 1 in terms of x'y' coordinates, assuming that the xy coordinate system results from a scaling of 3 units in the x' direction and 4 units in the y' direction.
A3(x')² + 4(y')² = 1
B(x'/3)² + (y'/4)² = 1
C(3x')² + (4y')² = 1
D(1/3)(x')² + (1/4)(y')² = 1
Show answerHide answer
Correct answer: (B) (x'/3)² + (y'/4)² = 1
Explanation
Scaling by 3 units in x' and 4 units in y' gives x = x'/3 and y = y'/4. Substituting in x² + y² = 1 gives (x'/3)² + (y'/4)² = 1.
Q545UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Find the normalization transformation that maps a window whose lower left corner is at (1, 1) and upper right corner is at (3, 5) onto a view port that is the entire normalized device screen
Q546UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The Bounded buffer problem is also known as_____
AProducer - consumer problem
BReader - writer problem
CDining philosophers problem
DBoth (a) and (b)
Show answerHide answer
Correct answer: (A) Producer - consumer problem
Explanation
The producer-consumer (bounded buffer) problem describes two processes, the producer and the consumer, which share a common fixed-size buffer used as a queue. The producer puts items into the buffer and waits if it is full; the consumer removes items and waits if it is empty.
Q547UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and manages kernel level threads. Three different types of models relate user and kernel level threads.
Which of the following statements is/are true?
(A)
(i) The many to one model maps many user threads to one kernel thread
(ii) The one - to - one model maps one user threads to one kernel thread
(iii) The many model maps many user threads to smaller or equal kernel threads
(B)
(i) Many - to- one model maps many kernel threads to one user thread
(ii) One - to - one model maps one kernel thread to one user thread
(iii) Many - to - many model maps many kernel threads to smaller or equal user threads
Code :
A(A) is true; (B) is false
B(A) is false; (B) is true
CBoth (A) and (B) are true
DBoth (A) and (B) are false
Show answerHide answer
Correct answer: (A) (A) is true; (B) is false
Explanation
In statement set (A), the many-to-one model maps many user threads to one kernel thread, the one-to-one model maps one user thread to one kernel thread, and the many-to-many model maps many user threads to a smaller or equal number of kernel threads; all are true. Set (B) reverses the roles of user and kernel threads, so it is false.
Q548UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a virtual page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 Suppose a demand paged virtual memory system running on a computer system such that the main memory has 3 page frames. Then.............. page replacement algorithm has minimum number of page faults.
AFIFO
BLIFO
CLRU
DOptimal
Show answerHide answer
Correct answer: (D) Optimal
Explanation
For this reference string with 3 frames, the optimal algorithm gives 9 page faults, fewer than FIFO, LIFO or LRU. So the optimal algorithm has the minimum number of page faults.
Q549UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider the following statements :
(A) UNIX provides three types of permissions
* Read
* Write
* Execute
(B) UNIX provides three sets of permissions
* permission for owner
* permission for group
* permission for others
Which of the above statement/s is/are true?
AOnly (A)
BOnly (B)
CBoth (A) and (B)
DNeither (A) nor (B)
Show answerHide answer
Correct answer: (C) Both (A) and (B)
Explanation
UNIX provides read, write and execute permissions on files, and three sets of permissions: for the owner, for the group and for others. So both (A) and (B) are true.
Q550UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the following WINDOWS system calls and UNIX system calls with reference to process control and file manipulation.
Windows
A. Create - process ( )
B. Wait for single object ( )
C. Create file ( )
D. Close Handle ( )
UNIX
i. Open ( )
ii. Close ( )
iii. Fork ( )
iv. Wait ( )
Code :
A B C D
Aiii iv i ii
Biv iii i ii
Civ iii ii i
Diii iv ii i
Show answerHide answer
Correct answer: (B) iv iii i ii
Explanation
Note: the standard correspondence is CreateProcess() - fork(), WaitForSingleObject() - wait(), CreateFile() - open(), CloseHandle() - close(), i.e. A-iii, B-iv, C-i, D-ii, which is option (a); the book keys (b). The book's mapping is A-iv, B-iii, C-i, D-ii.
How to use these UGC NET Computer Science questions
Every question here was asked in a real UGC NET paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full UGC NET papers as timed tests to check your speed under exam conditions.