英语面试-更新中
Difference between Process and Thread:
S.NO | PROCESS | THREAD |
---|---|---|
1. | Process means any program is in execution. | Thread means segment of a process. |
2. | Process takes more time to terminate. | Thread takes less time to terminate. |
3. | It takes more time for creation. | It takes less time for creation. |
4. | It also takes more time for context switching. | It takes less time for context switching. |
5. | Process is less efficient in term of communication. | Thread is more efficient in term of communication. |
6. | Process consume more resources. | Thread consume less resources. |
7. | Process is isolated. | Threads share memory. |
8. | Process is called heavy weight process. | Thread is called light weight process. |
9. | Process switching uses interface in operating system. | Thread switching does not require to call a operating system and cause an interrupt to the kernel. |
10. | If one server process is blocked no other server process can execute until the first process unblocked. | Second thread in the same task could run, while one server thread is blocked. |
B-TREE BINARY TREE
S.NO | B-TREE | BINARY TREE |
---|---|---|
1. | In a B-tree, a node can have maximum ‘M'(‘M’ is the order of the tree) number of child nodes. | While in binary tree, a node can have maximum two child nodes or sub-trees. |
2. | B-tree is called as sorted tree as its nodes are sorted in inorder traversal. | While binary tree is not a sorted tree. It can be sorted in inorder, preorder or postorder traversal. |
3. | B-tree has a height of logM N (Where ‘M’ is the order of tree and N is the number of nodes). | While binary tree has a height of log2 N(Where N is the number of nodes). |
4. | B-Tree is performed when the data is loaded in the disk. | Unlike B-tree, binary tree is performed when the data is loaded in the RAM(faster memory). |
5. | B-tree is used in DBMS(code indexing, etc). | While binary tree is used in Huffman coding and Code optimization and many others. |
6. | To insert the data or key in B-tree is more complicated than binary tree. | While in binary tree, data insertion is not complicated than B-tree. |
CSMA/CD(slash斜杠) CSMA/CA
S.NO | CSMA/CD(slash斜杠) | CSMA/CA |
---|---|---|
1. | CSMA / CD is effective after a collision. | Whereas CSMA / CA is effective before a collision. |
2. | CSMA / CD is used in wired networks. | Whereas CSMA / CA is commonly used in wireless networks. |
3. | It only reduces the recovery time. | Whereas CSMA/ CA minimizes the possibility of collision. |
4. | CSMA / CD resend the data frame whenever a conflict occurs. | Whereas CSMA / CA will first transmit the intent to send for data transmission. |
5. | CSMA / CD is used in 802.3 standard. | While CSMA / CA is used in 802.11 standard. |
6. | It is more efficient than simple CSMA(Carrier Sense Multiple Access). | While it is similar to simple CSMA(Carrier Sense Multiple Access). |
Difference between General tree and Binary tree
GENERAL TREE | BINARY TREE |
---|---|
General tree is a tree in which each node can have many children or nodes. | Whereas in binary tree, each node can have at most two nodes. |
The subtree of a general tree do not hold the ordered property. | While the subtree of binary tree hold the ordered property. |
In data structure, a general tree can not be empty. | While it can be empty. |
In general tree, a node can have at most n(number of child nodes) nodes. | While in binary tree, a node can have at most 2(number of child nodes) nodes. |
In general tree, there is no limitation on the degree of a node. | While in binary tree, there is limitation on the degree of a node because the nodes in a binary tree can’t have more than two child node. |
In general tree, there is either zero subtree or many subtree. | While in binary tree, there are mainly two subtree: Left-subtree and Right-subtree. |
ARRAY LINKED LIST
BASIS FOR COMPARISON |
ARRAY |
LINKED LIST |
---|---|---|
Basic | It is a consistent set of a fixed number of data items. | It is an ordered set comprising a variable number of data items. |
Size | Specified during declaration. | No need to specify; grow and shrink during execution. |
Storage Allocation | Element location is allocated during compile time. | Element position is assigned during run time. |
Order of the elements | Stored consecutively | Stored randomly |
Accessing the element | Direct or randomly accessed, i.e., Specify the array index or subscript. | Sequentially accessed, i.e., Traverse starting from the first node in the list by the pointer. |
Insertion and deletion of element | Slow relatively as shifting is required. | Easier, fast and efficient. |
Searching | Binary search and linear search | linear search |
Memory required | less | More |
Memory Utilization |
Differences between TCP and UDP
TRANSMISSION CONTROL PROTOCOL (TCP) | USER DATAGRAM PROTOCOL (UDP) |
---|---|
TCP is a connection-oriented protocol. Connection-orientation means that the communicating devices should establish a connection before transmitting data and should close the connection after transmitting the data. | UDP is the Datagram oriented protocol. This is because there is no overhead for opening a connection, maintaining a connection, and terminating a connection. UDP is efficient for broadcast and multicast type of network transmission. |
TCP is reliable as it guarantees delivery of data to the destination router. | The delivery of data to the destination cannot be guaranteed in UDP. |
TCP provides extensive error checking mechanisms. It is because it provides flow control and acknowledgment of data. | UDP has only the basic error checking mechanism using checksums. |
Sequencing of data is a feature of Transmission Control Protocol (TCP). this means that packets arrive in-order at the receiver. | There is no sequencing of data in UDP. If ordering is required, it has to be managed by the application layer. |
TCP is comparatively slower than UDP. | UDP is faster, simpler and more efficient than TCP. |
Retransmission of lost packets is possible in TCP, but not in UDP. | There is no retransmission of lost packets in User Datagram Protocol (UDP). |
TCP has a (20-80) bytes variable length header. | UDP has a 8 bytes fixed length header. |
TCP is heavy-weight. | UDP is lightweight. |
TCP doesn’t supports Broadcasting. | UDP supports Broadcasting. |
TCP is used by HTTP, HTTPs, FTP, SMTP and Telnet. | UDP is used by DNS, DHCP, TFTP, SNMP, RIP, and VoIP. |
🐳 作者:hiszm 📢 版权:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,万分感谢。 💬 留言:同时 , 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |