Menu

Sunday, December 8, 2013

Some useful stuff on UNIX and Network Security


1) Secure Shell (SSH) is a UNIX-based command interface and protocol for securely getting access to a remote computer. It is a suite of three utilities - slogin, ssh, and scp - that are secure versions of the earlier UNIX utilities, rlogin, rsh, and rcp. SSH uses RSA public key cryptography for both connection and authentication. Its default encryption algorithm is IDEA (International Data Encryption Algorithm).

2) IDEA encryption algorithm was developed at ETH in Zurich, Switzerland. It uses a block cipher with a 128-bit key, and is considered to be very secure and among the best publicly known algorithms.

3) A spam cocktail (or anti-spam cocktail) is the use of several different technologies in combination to successfully identify and minimize spam. It puts each e-mail message through a series of tests that provides a numeric score showing how likely the message is to be spam. Scores are computed and the message is assigned a probability rating.

4) Non-repudiation is the assurance that someone cannot deny something. Typically, non-repudiation refers to the ability to ensure that a party to a contract or a communication cannot deny the authenticity of their signature on a document or the sending of a message that they originated.

5) Echelon is an officially unacknowledged U.S.-led global spy network that operates an automated system for the interception and relay of electronic communications. Monitored transmissions are said to include up to 3 billion communications daily, including all the telephone calls, e-mail messages, faxes, satellite transmissions, and Internet downloads of both public and private organizations and citizens worldwide. Led by the U.S. National Security Agency (NSA).

6) On UNIX systems, snort is an open source network intrusion detection system (NIDS). Snort is a packet sniffer that monitors network traffic in real time, scrutinizing each packet closely to detect a dangerous payload or suspicious anomalies. Through protocol analysis and content searching and matching, Snort detects attack methods, including denial of service, buffer overflow, CGI attacks, stealth port scans, and SMB probes.

7) Server Message Block (SMB) is a network protocol mostly used by Windows-based computers that allows systems within the same network to share files. It allows computers connected to the same network or domain to access files from other local computers as easily as if they were on the computer's local hard drive.

8 ) Greynet (or graynet)) is a term for the use of unauthorized applications on a corporate network. A greynet application is a network-based program that corporate network users download and install without permission from their company's IT department. They introduce security risks, including client code vulnerabilities and new avenues for attack, and can lead to data loss and property or identity theft.

9) Munging is the deliberate alteration of an e-mail address on a Web page to hide the address from spambot programs that examine the Internet for e-mail addresses. Such addresses are easily recognized because they contain the @ symbol. Address munges should allow a real person reading the content (as opposed to a program scanning it) to easily deduce the true e-mail address.

Here is an example of a munged address: editor at xyz dot com.

10) Traceroute is a utility that records the route (the specific gateway computers at each hop) through the Internet between your computer and a specified destination computer. It also calculates and displays the amount of time each hop took. This utility initiates the sending of a packet using Internet Control Message Protocol (ICMP), including in the packet a time limit value (known as the "time to live" (TTL) that is designed to be exceeded by the first router that receives it, which will return a Time Exceeded message. This enables traceroute to determine the time required for the hop to the first router. Increasing the time limit value, it resends the packet so that it will reach the second router in the path to the destination, which returns another Time Exceeded message, and so forth. Finally, traceroute determines when the packet has reached the destination.
11) Intrusion Detection Systems (IDS) is a passive way to monitor a network and its computers. The program keep a watch on all inbound and outbound traffic and looks for attacks. It sends an alert when it finds something unusual. It can only act on known intrusion signatures. Intrusion Detection Systems (IPS) tools perform active, in-line monitoring and can prevent attacks by known and unknown sources.

12) An IDS is not a substitute for a firewall. A firewall can stop intrusions like an IDS but is not able to monitor activity from inside the network.

13) Honey Pot Systems are decoy servers or systems setup to gather information regarding an attacker or intruder into your system. It can be setup inside, outside or in the DMZ of a firewall design or even in all of the location.

14) Port Scanning identifies open doors to a computer. There is no way to stop someone from port scanning your computer while you are on the Internet because accessing an Internet server opens a port, which opens a door to your computer. Types of port scans:
vanilla: the scanner attempts to connect to all 65,535 ports
strobe: a more focused scan looking only for known services to exploit
fragmented packets: the scanner sends packet fragments that get through simple packet filters in a firewall
UDP: the scanner looks for open UDP ports
sweep: the scanner connects to the same port on more than one machine
FTP bounce: the scanner goes through an FTP server in order to disguise the source of the scan.
stealth scan: the scanner blocks the scanned computer from recording the port scan activities.

15) Types of firewall techniques:
Packet filter: Looks at each packet entering or leaving the network and accepts or rejects it based on user-defined rules. Packet filtering is fairly effective and transparent to users, but it is difficult to configure. In addition, it is susceptible to IP spoofing.
Application gateway: Applies security mechanisms to specific applications, such as FTP and Telnet servers. This is very effective, but can impose a performance degradation.
Circuit-level gateway: Applies security mechanisms when a TCP or UDP connection is established. Once the connection has been made, packets can flow between the hosts without further checking.
Proxy server: Intercepts all messages entering and leaving the network. The proxy server effectively hides the true network addresses.

Thursday, August 1, 2013

Answer Keys for June 2013 - Computer Science

After researching different resources, I am able to compile Answer keys for June 2013 paper of Computer Science. First, I am posting keys for Paper III as this paper is tougher to clear than othet two papers. I am sure 90% of the answers I have given are correct.
1. A
2. D
3. C
4. B
5. B
6. B
7. C
8. D
9. A or B
10. D
11. C
12. --
13. D
14. D
15. --
16. A
17. A
18. B
19. C
20. D
21. D
22. B
23. C
24. A
25. --
26. A
27. B
28. C
29. D
30. A
31. B
32. A
33. C
34. D
35. D
36. --
37. --
38. B
39. C
40. B
41. C
42. D
43. --
44. B
45. A
46. C
47. B
48. A
49. B
50. A
51. C
52. A
53. A
54. D
55. A
56. --
57. A
58. B
59. --
60. D
61. B
62. A
63. B
64. C
65. B
66. D
67. --
68. D
69. C
70. C
71. B
72. C
73. C
74. --
75. --

Useful Q & A on Networking - Part 1

Q 1. What happens at every layer of the OSI model when we type "www.google.com" in the browser? 

Ans. The following sequence of steps takes place every time we type the name of a website in a browser->
1) Your PC will need to resolve "www.google.com" to an IP address. It will therefore need to send a 
query to your DNS server ( usually your ISP's DNS).

2) The PC constructs a DNS query packet with a destination IP address equal to your DNS server 
and a destination MAC address of your router (gateway).

3) The DNS query process begins to resolve the IP address of the given URL.

4) Once your PC (web browser application) receives the IP address of the destination web server, it will construct a HTTP GET request and send it to Google's web server. (As per OSI model at application layer [layer 7] application software which is client web browser now know the IP address of google.com). After that it pass that information down to presentation layer.

5) Presentation layer[ layer 6] converts that HTTP request into a standard format which is HTTP format so that the other layers can understand.and pass that information down to session layer.

6) Session layer[ layer 5] at client side creates session for www.google.com which is HTTP session so that it can be separated from other sessions.and pass that information down to transport Layer.

7) Transport Layer[ layer 4]  at client side chooses TCP for every HTTP session which is reliable connection which creates virtual connection by using three way hand-shake before sending actual data [HTTP Request]. This layer also prepares segments by adding source and destination port number. Source port is chosen by upper layer which is random number range from 1024 to 65535  and destination port number is here 80, which is well known port number used for HTTP services.

Layer 4 assign source port number to distinguish the web browser application from every other program running on computer and it also used to identify which application should receive return traffic. The destination port number is used to make sure that messages coming from web browser gets and sent to web server program running on the server and is not grabbed by other program. After preparing segment, layer 4 at client side pass that information down to network layer.

8) Network Layer [ layer 3] at client side  prepares packet by adding source and destination IP address. It also check whether destination IP address is on local network or it is on remote network. If it is on local network it checks ARP cache to find mac address of local device. If cache is empty it sends ARP message to resolve IP address into MAC address. Here the device is on remote network so client PC sends ARP to find MAC address of default gate way [192.168.1.1]. Every devices on that network segment gets that ARP request because as it layer 2 broadcast message destined for all devices on that broadcast domain but only the default gateway, which is 192.168.1.1, replies with its MAC address. Then network layer passes this information down to data link layer.

9) Data link layer[ layer 2]  prepares frame by adding source and destination MAC address of default gate way[192.168.1.1]. It also rund CRC which simply checks the data and frame header bits and add that result in to frame check sequence (FCS) field. Then, passes this information down to Physical layer.

10) Physical layer[ layer 1]: converts all this information in 1's and 0's and sends it to destination device using Ethernet cable.

11) Google's Web server will reply and start sending your application the necessary data using TCP session.

12) The application will start to draw and present the website on your screen.

At the server side, i.e. Google:

1) At Physical layer, server receives the bits. Layer 2 of server builds frames and runs CRC and checks answer with FCS field. If answer didn't match then the frame is discarded. If it matches then the destination MAC address is checked. Here, destination MAC address is right, so it checks Ethernet type field to find the protocol used at network layer (which is IP). It retrieves the packet from the frame and gives to IP at network layer.

2) Network layer checks destination IP address and in our case it matches so it checks protocol type field to find the protocol used at Layer 4 (which is TCP). Now network layer of server sends all information up to TCP at layer 4.

3) At transport layer, destination port number is checked which is well know port number 80, which is destined to web server application running on that particular server i.e. in our case www.google.com. So it passes all those information up to google web server. Google web server sends acknowledgement message to client to ensure that it has received its request. Finally, it sends the web page in the form of packet by packet over the network to client. This information gives google web page to our client web browser.

Wednesday, July 17, 2013

Notes on Computer Networking:Part II

IP address classes:
Class
Leftmost bits
Start address
Finish address
A
0xxx
0.0.0.0
127.255.255.255
B
10xx
128.0.0.0
191.255.255.255
C
110x
192.0.0.0
223.255.255.255
D
1110
224.0.0.0
239.255.255.255
E
1111
240.0.0.0
255.255.255.255

IP address range for Intranets (Private Networks):
Class
Private start address
Private finish address
A
10.0.0.0
10.255.255.255
B
172.16.0.0
172.31.255.255
C
192.168.0.0
192.168.255.255

IP packets addressed by them cannot be transmitted onto the public Internet. If such a private network needs to connect to the Internet, it must use either a network address translator (NAT) gateway, or a proxy server.

Some good facts on IP V6:

In IPV6, The address block fc00::/7 has been reserved for private networks.
IP officially reserves the entire range from 127.0.0.0 through 127.255.255.255 for loopback purposes.
Very Imp: IPv6 does not use classes. IPv6 supports the following three IP address types: 
1. Unicast 
2. Multicast 
3. Anycast
IPv6 does not support broadcast. Multicast addresses in IPv6 start with 'FF' (255) just like IPv4 addresses. Unicast addresses have 3 defined scopes, including link-local, site-local and global; and multicast addresses have 14 scopes.
The number of IPv6 addresses is 1028. There is no ARP in V6. Currently, DHCP, FTP, PPP, RIP, SNMP, VPN, L2TP and Telnet do not support IPv6.
IPv6 does not require NAT. NAT, too, doesn't support V6. Currently, IPv6 packets are not forwarded.
IPv6 reserves just two special addresses: 0:0:0:0:0:0:0:0 and 0:0:0:0:0:0:0:1. IPv6 uses 0:0:0:0:0:0:0:0 internal to the protocol implementation, so nodes cannot use it for their own communication purposes. IPv6 uses 0:0:0:0:0:0:0:1 as its loopback address, equivalent to 127.0.0.1 in IPv4. The minimum size of an IP datagram is 28 bytes, including 20 bytes of header.
Anycast is a network addressing and routing methodology in which datagrams from a single sender are routed to the topologically nearest node in a group of potential receivers, though it may be sent to several nodes, all identified by the same destination address. On the Internet, anycast is usually implemented by using BGP.
In denial-of-service attacks (DoS), a rogue network host may advertise itself as an anycast server for a vital network service, to provide false information or simply block service.
6to4 is an Internet transition mechanism for migrating from IPv4 to IPv6, a system that allows IPv6 packets to be transmitted over an IPv4 network. 6to4 does not facilitate interoperation between IPv4-only hosts and IPv6-only hosts, but simply a transparent mechanism used as a transport layer between IPv6 nodes.

The network requests supporting DNS lookups run over TCP and UDP, port 53 by default.

Some Questions-Answers with explanation
In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges. Why is the spanning tree algorithm used for bridge-routing? (GATE 2005)
(a) For shortest path routing between LANs         (b) For avoiding loops in the routing paths
(c) For fault tolerance                                      (d) For minimizing collisions
SOLUTION: Spanning tree is a protocol that allows the bridges to exchange information so that only one of them will handle a given message that is being sent between two computers within the network. This  protocol prevents the condition known as a BRIDGE LOOP. It is typical to add a second bridge between two network segments as a backup in case the primary bridge fails (both bridges need to have some way to understand which bridge is the primary one). To do this, they have a separate path connection just between the bridges in which they exchange information, using bridge protocol data units (BPDUs).
The program in each bridge that allows it to determine how to use the protocol is known as the spanning tree algorithm. The algorithm is specifically constructed to avoid bridge loops (for a bridge using only the most efficient path when faced with multiple paths). If the best path fails, the algorithm recalculates the network and finds the next best route.
How many 8-bit characters can be transmitted per second over a 9600 baud serial communication link using asynchronous mode of transmission with one start bit, eight data bits, two stop bits and one parity bit?
(1) 600         (2) 800         (3) 876           (4) 1200
For 9600 baud, 1 bit=1/9600=0.104mS. Each char would require 11 bits. That means, to transmit one char, it would take 1.144 mS. So, applying the formula 1000/1.144 (mS in one Sec/transmission time for one char)=approx 875. Nearest answer is (3)
The single stage network is also called
A) one sided network                             B) two sided network
C) recirculating network                      D) pipeline network
Single-Stage Network is a single stage of switching elements (SEs) existing between the inputs and the outputs of the network. Data is circulated a number of times around the network.
 If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet?
(a) 1022 (b) 1023 (c)
 2046 (d) 2047
Explanation: Convert the subnet mask into binary format.
255.255.248.0 = 11111111.11111111.11111000.00000000
Number of 1's in the subnet mask indicates the Network-ID and the Subnet-ID part. Number of 0's in the subnet mask indicates the Host-ID part. Maximum number of Hosts per subnet = 211 = 2048, where 11 = Number of 0's in the Subnet Mask. Out of 2048 values, 2 addresses are reserved, hence we remove them (2048-2 = 2046). Note: In the host part of the address:- all bits as 1 is reserved as broadcast address and all bits as 0 is used as network address of subnet.
Which of the following system calls results in the sending of SYN packets?
(a) socket (b) bind (c) listen (d) connect
The connect system call is normally called by the client process to connect to the server process. The socket system call creates a new socket and assigns the protocol and resources to the created socket descriptor. The bind system call associates a local network transport address with a socket. For a client process, it is not mandatory to issue a bind call. The kernel takes care of doing an implicit binding when the client process issues the connect system call. It is often necessary for a server process to issue an explicit bind request before it can accept connections or start communication with clients. The listen call indicates to the protocol that the server process is ready to accept any new incoming connections on the socket. There is a limit on the number of connections that can be queued up, after which any further connection requests are ignored.


Tuesday, July 16, 2013

Notes on Computer Networking:Part I

Friends,

I am posting some notes on different important terms of Networking. Based on your feedback, I will add more posts on Networking and other topics

********************************************************
ETHERNET: Ethernet frames must carry a minimum payload of 46 bytes, which ensures that a valid Ethernet frame is 512-bits long (considering bits of header section also). The shortest Ethernet frame is 64 bytes in length, which carry Control messages.

Ethernet frames don't have a way to indicate end-of-frame, but an inter-frame gap (of time required to send 96 bit of data, i.e. 9.6 microsec.) is used.

Slot Time: It is twice the time it takes for an electronic pulse to travel the maximum distance between two nodes. Thus Propagation delay takes half of the time of slot time since it is only the measure of the time required for signal to reach from node A to B. Slot time is used for half-duplex Ethernet network operation. It is 512 bit times for Ethernet networks operating below 1 Gbit/s, and 4096 bit times for Gigabit Ethernet. To reliably detect collisions, the minimum transmission time for a complete frame must be at least one slot time, whereas the round-trip propagation delay must be less than a slot time (half of slot time).

Back-off Algorithm: Once a collision is detected by simultaneous transmitters, they will follow a backoff algorithm, which requires each transmitter to wait an integral number of slot times (51.2 µs) before attempting a new transmission sequence. The integer is determined by the equation:
0<=r<2 power k where k = min (n, 10)
The variable k is actually the number of collisions capped at a maximum of 10. Therefore, r can range from 0 to 1023. The actual value for r is determined by a random process within each Ethernet node. As the number of consecutive collisions increases, the range of possible backoff times increases exponentially. The number of possible retries is max. 16.
There are no collisions with a full-duplex link, where each node is paired with a port on the hub.

Collision Domain: a section of a network where data packets can collide with one another when being sent on a shared medium or through repeaters, in particular.

The 5-4-3 rule: A system can have up to five segments in series, with up to four repeaters and no more than three mixing segments (a segment that may be connected to more than two transceivers).

The FCS field in Ethernet frame provides only bit-level error detection, no error recovery.
UDP is also known as laissez-faire protocol.

TCP is used for unicast addresses only, so multicast applications must use the UDP transport protocol.

In asynchronous transmission, the Start bit always has a value of 0 (a Space). The Stop Bit always has a value of 1 (a Mark). This means that there will always be a Mark (1) to Space (0) transition on the line at the start of every word.

Application layer is free to send any size of data, there is no upper limit defined by standards. The lower layers divides the data if needed.

A channel with x bps may not necessarily transmit data at x rate, since protocols, encryption, and other factors can add may overheads.

The asymptotic bandwidth (formally asymptotic throughput) for a network is the measure of maximum throughput for a greedy source (a traffic generator that generates data at the maximum rate possible and at the earliest opportunity possible).

CIDR: Classless Inter-Domain Routing, known as supernetting, is a solution to limited address space problem in a network. It allocates address space to ISPs and end users on any address bit boundary, instead of on 8-bit segments (which is class based addressing). It appends to the IP address a slash character and the decimal number as routing prefix, e.g., "192.168.2.0/24" for IPv4, and 2001:db8::/32 for IPv6. The value after / indicates how many bits are used for the network prefix, leaving the remaining bits to identify the specific host.

CIDR currently uses prefixes anywhere from 13 to 27 bits. This solution fits an organization's specific needs. It helps in reducing number of entries in global routing tables. It is the concept of subnetting within the internet itself.

The industrial, scientific and medical (ISM) radio bands are radio bands (portions of the radio spectrum) reserved internationally for industrial, scientific and medical purposes other than communications. These are for unlicensed operations. Cordless phones, Bluetooth devices, near field communication (NFC) devices, and wireless computer networks all use frequencies allocated to low power communications as well as ISM.

Hartley's law: "The maximum data rate of a physical communication link is proportional to its bandwidth in hertz, which is sometimes called frequency bandwidth, spectral bandwidth, RF bandwidth, signal bandwidth or analog bandwidth."

A Baud Rate represents the number of bits that are actually being sent over the media, not the amount of data that is actually moved from one DTE device to the other. That means, baud rate decides the actual bit rate. For example, the bit rate is 9600

The Intelligent Network (IN) is the standard network architecture which allows telecom operators to differentiate themselves by providing value-added services in addition to the standard telecom services. The intelligence is provided by network nodes on the service layer (a conceptual layer within a network service provider architecture. It aims at providing middleware that serves third-party value-added services and applications at a higher application layer.)

The Internet protocol suite ( TCP/IP Model), occasionally known as the DoD model due to the foundational influence of the ARPANET. The TCP/IP model and related protocols are maintained by the Internet Engineering Task Force (IETF).

PORT: Each process that wants to communicate with another process identifies itself to the TCP/IP protocol suite by one or more ports. Application Layer talks with Transport layer through ports. A port number helps the transport layer protocols (like TCP) to know the type of content residing inside the packet.
A port is a 16-bit number, used by the host-to-host protocol to identify to which higher level protocol or application program (process) it must deliver incoming messages. There are two types of ports. Well-known port numbers(0-1023) are typically odd, because early systems using the port concept required an odd/even pair of ports for duplex operations.

The well-known ports are controlled and assigned by the Internet Assigned Number Authority (IANA) and on most systems can only be used by system processes or by programs executed by privileged users. Ephemeral ports are opposite to well-known ports. Such port number are used by clients and are contained in the UDP datagrams sent to the server.

Normally, a server will use either TCP or UDP, but there are exceptions. For example, domain name servers use both UDP port 53 and TCP port 53.

SOCKET: A socket is a special type of file handle, which is used by a process to request network services from the operating system. A socket address is the triple: <protocol, local-address, local-process>. For example, in the TCP/IP suite:
<tcp, 193.44.234.3, 12345>

An association is the 5-tuple that completely specifies the two processes that comprise a connection:
<protocol, local-address, local-process, foreign-address, foreign-process>. In the TCP/IP suite, the following could be a valid association:
<tcp, 193.44.234.3, 1500, 193.44.234.5, 21>

Two processes communicate via TCP sockets. The socket model provides a process with a full-duplex byte stream connection to another process.

UDP: UDP is basically an application interface to IP. It adds no reliability, flow-control, or error recovery to IP. It simply serves as a multiplexer/demultiplexer for sending and receiving datagrams, using ports to direct the datagrams. It requires the application to take responsibility for error recovery and so on.

Slow-start is one of the algorithms that TCP uses to control congestion inside the network. It is also known as the exponential growth phase.

Broadband means "having instantaneous bandwidths greater than 1 MHz and supporting data rates greater than about 1.5 Mbit/s." In telecommunication, Broadband refers to a communication bandwidth of at least 256 kbit/s. Each channel is 6 MHz wide.

Monday, July 15, 2013

Important Links for UGC NET - Computer Sci.


I have been in the habit of searching web links on topics I couldn't find much information in books or were too theoretical. In this process, I made a list of URLs which contain useful stuff in a good language. I am posting these URLs for all my friends who are aiming to crack the NUT errrrrrr NET :-)
I am not boasting of providing best of links but just want to say I got good help from these URLs.

All the best for your 05 November, 2017 NET Exam!

(NOTE: If a particular link does not work, then try to paste the link directly in the browser window. Some links may not work if you click them directly from this post)

NETWORKING:
http://www.perihel.at/2/basics/  (Very good site to learn at deep level)
http://ckp.made-it.com/ (Good link to learn OSI layer 1 & 2)
http://www.differencebetween.com/category/technology/it/

Database:
http://djitz.com/guides/how-to-check-if-a-relation-is-in-bcnf-3nf-or-both/
http://www.differencebetween.com/difference-between-conceptual-and-vs-logical-model/
www.eecs.umich.edu/~teorey/lec.notes.pdf

OS:
http://www.personal.kent.edu/~rmuhamma/OpSystems/os.html
http://www.computerhope.com/unix/utr.htm
http://www.indiabix.com/computer-science/operating-systems-concepts/015001
http://www.chibios.org/dokuwiki/doku.php?id=chibios:articles:semaphores_mutexes
http://all-operatingsystems.blogspot.in/2009/10/multiple-choice-questions-on-operating_8948.html
http://www-ist.massey.ac.nz/csnotes/355/lectures/monitors.pdf
http://siber.cankaya.edu.tr/ozdogan/OperatingSystems/ceng328/node197.html

Automata Notes:
http://cs.union.edu/~striegnk/learn-prolog-now/html/node55.html#sec.l7.cfg
http://www.cs.uky.edu/~lewis/texts/theory/languages/cfl-prop.pdf
http://www.cs.uky.edu/~lewis/texts/theory/automata/lb-auto.pdf

http://courses.cs.vt.edu/~cs4114/
http://www.cs.cmu.edu/~eugene/teach/auto01/notes/
http://www.tenouk.com/visualcplusmfc/visualcplusmfc16.html  (Great site for learning Windows Programming)
http://www.youtube.com/watch?v=IhyEGNn-7Uo&feature=related  (Video on Turing Machine)
http://www.youtube.com/watch?v=id7k6gUkZ8Y&feature=relmfu  (Video on NP-Complete Problem)
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/compiler-desing/ui/Course_home-4.htm
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-%20Guwahati/afl/index.htm
http://www.bukisa.com/articles/393888_basics-of-message-handling-in-windows#ixzz1eRNPTl6O
http://www.di.uevora.pt/~lmr/syscalls.html
http://www.psexam.com/Database-Management-System-and-Design/dbms-and-design-mcq-set-3.html

Computer Organization:
http://blogs-static.maktoob.com/wp-content/blogs.dir//67186/files//2010/02/digital-electronics-introduction.pdf

Software Engg.
http://www.smartdraw.com/resources/tutorials/dfd-levels/#/resources/tutorials/
http://users.csc.calpoly.edu/~jdalbey/SWE/Design/STDexamples.html
http://www2.cs.unibw.de/tools/DiaGenDiaMeta/img/nsd_t.png   (It has Nassi-Shneiderman Diagrams)

Computer Graphics:
http://marintellect.com/help_topics/graphics/index.html
http://www.slideshare.net/askme/chapter-10-280485?src=related_normal&rel=2953874

Computer Organization & Microprocessor:
http://www.allaboutcircuits.com/
http://ptucse.loremate.com/sp/node/6    (Imp Q & A)
http://www.ustudy.in/node/3036 ( Learning gates & circuits)

AI/ADA:
http://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm.html

C/C++/Data Structure:
https://www.securecoding.cert.org/confluence/display/seccode/STR36-C.+Do+not+specify+the+bound+of+a+character+array+initialized+with+a+string+literalhttp://www.cs.umd.edu/class/fall2006/cmsc351/notes/
http://www.youtube.com/watch?v=eWeqqVpgNPg   (Video on Trees traversals)
http://faculty.cs.niu.edu/~freedman/340/340notes/340hash.htm  (Hashing Technique)

Probability Theory, Permutation Combination:
http://iim-cat-questions-answers.2iim.com/quant_math_sample_problems/permutation_combination_probability/
http://homes.ieu.edu.tr/uufuktepe/m144/logic/1.htm (Propositions)
http://mathworld.wolfram.com

Option-V Unix/Windows:
http://pravin.insanitybegins.com/win32/lesson2  (6 functions for window creation)

Online Objective Tests:


UGC NET Computer Sci. - Sample Questions

I am posting here some questions on different topics. I have compiled these questions from various sources and have edited them to make them more understandable. I hope it may help the candidates.

Q 1. Select which is/are true:
1) A foreign key can reference a non-primary key
2) A unique key column can have multiple NULL value(s).
3) A foreign key may contain null values.
4) A primary key is always NOT NULL.

A) 1,2,3,4
B) 4 only
C) 1,4
d)1,3,4
Ans. (A)

SOLUTION: All statements are TRUE. A FOREIGN KEY constraint does not have to be linked only to a PRIMARY KEY constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. A FOREIGN KEY constraint can contain null values; however, if any column of a composite FOREIGN KEY constraint contains null values, verification of all values that make up the FOREIGN KEY constraint is skipped. Means, the non-null portions of the key do not have to match any corresponding portion of a parent key.

According to the SQL standard and Relational Model theory, a unique key (unique constraint) should accept NULL in several rows/tuples — however not all RDBMS implement this feature correctly.

A Primary key is automatically declared as NOT NULL since any Primary key has four properties:
1). It is always NOT NULL.
2) It always carries/allows unique data only.
3) One table can have at most one primary key.
4) primary key column(s) is/are always indexed (for fast retrievals in queries).

Q 2. Which of the following queries cannot be expressed using the basic relational algebra operations? (GATE CS 2000)
A) Department address of every employee
B) Employees whose name is the same as their department name
C) The sum of all employees’ salaries
D) All employees of a given department
Ans. (D)

SOLUTION: The six basic operators of relational algebra are the selection, the projection, the Cartesian product, the set union, the set difference, and the rename (p). None of them can be omitted without losing expressive power. Many other operators have been defined in terms of these six. Among the most important are set intersection, division, and the natural join, but aggregation is not possible with these basic relational algebra operations. So, we cannot run sum of all employees’ salaries with the six operations.

Q 3. Which one of the following statements about normal forms is FALSE?
A) BCNF is stricter than 3NF
B) Lossless, dependency-preserving decomposition into 3NF is always possible
C) Lossless, dependency-preserving decomposition into BCNF is always possible
D) Any relation with two attributes is in BCNF
Ans. (C)

SOLUTION: In some cases, a non-BCNF table cannot be decomposed into tables that satisfy BCNF and preserve the dependencies that held in the original table. Unlike the first three normal forms, BCNF is not always achievable.
However, only in rare cases does a 3NF table not meet the requirements of BCNF. A 3NF table which does not have multiple overlapping candidate keys is guaranteed to be in BCNF. A 3NF table with two or more overlapping candidate keys may or may not be in BCNF.
For example, R(A,B,C,D) which has FDs: AB -> C, BC -> D. Here candidate key B is overlapping, i.e. composite candidate keys with at least one attribute in common.

Q 4. How many 8-bit characters can be transmitted per second over a 9600 baud serial communication link using asynchronous mode of transmission with one start bit, eight data bits, two stop bits and one parity bit?
A) 600
B) 800
C) 876
D) 1200
Ans. (B)

SOLUTION: For 9600 baud, 1 bit=1/9600=0.104 mS. Each char would require 12 bits (8 bit data+1 start bit+2 stop bits+1 parity bit). That means, to transmit one char, it would take 1.248 mS (0.104*12). So, applying the formula 1000/1.1248 (mS in one Sec/transmission time for one char)=approx 801.28. Nearest ans is (2)

Q 5. Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned.
Method Used by P1
while (S1 == S2) ;
Critica1 Section
S1 = S2;

Method Used by P2
while (S1 != S2) ;
Critica1 Section
S2 = not (S1);

Q 6. Which one of the following statements describes the properties achieved? (GATE CS 2010)
A) Mutual exclusion but not progress
B) Progress but not mutual exclusion
C) Neither mutual exclusion nor progress
D) Both mutual exclusion and progress
Ans. (A)

SOLUTION: Mutual Exclusion requirement is satisfied here since the loop condition in p1 and p2 ensures only one will execute, if ever, in its critical section (CS). But Progress Requirement is not satisfied becoz as per definition of Progress Requirement:
"If no process is executing in its CS and there exist some process(es) that wishes to enter their CS, then the selection of the processes that will enter the CS next CANNOT BE POSTPONED indefinitely."
Here, selection can be delayed. Execution of one is dependent on the other which hinders the progress. Suppose process 1 after executing CS again wants to execute the CS and Process 2 doesn't want to execute CS then in that case p1 has to unnecessarily wait for p2.

NOTE: The question on critical section is also in MCQ book by Timothy Williams in which he mentioned ans. as D. The book has explanation also for this answer. However, I found different answer after researching it on Internet. Please post your comments/ideas becuse it is very imp. to be sure of ans of such confusing Q & A.

Q 7 Location transparency allows :
 I. Users to treat the data as if it is done at one location.
 II. Programmers to treat the data as if it is at one location.
 III. Managers to treat the data as if it is at one location.
 Which one of the following is correct ?
 A) I, II and III
 B) I and II only
 C) II and III only
 D) II only
Ans. (A)

SOLUTION: Location transparency means the location of data must not matter to the person who accesses/manipulates the data. This is a feature of distributed databases, which applies to every kind of database user. According to a definition on Wikipedia, "The location of a resource doesn't matter to either the software developers or the end-users. This creates the illusion that the entire system is located in a single computer, which greatly simplifies software development."

The I and II are database users. The III is a component of distributed databases. Database Manager components are responsible for providing seamless data access to users without regards to its location. Hence, this covers all 3 choices.

Q 8. Which of the following is correct ?
I. Two phase locking is an optimistic protocol.
II. Two phase locking is pessimistic protocol
III. Time stamping is an optimistic protocol.
IV. Time stamping is pessimistic protocol.

A) I and III
B) II and IV
C) I and IV
D) II and III
Ans. (D)

SOLUTION: Optimistic Vs. Pessimistic approach: The optimistic concurrency control approach doesn't actually lock anything. It is based on the assumption that conflicts of database operations are very less. Means, when when oner transaction is executing, other transactions will not access the same data item being accessed by the executing one. It lets transactions run to completion and only checks for conflicts when they are about to commit. Thus, a transaction is executed without any restrictions until it is committed.

The pessimistic approach believes that some other transaction might try to access the same piece of data. So, in order to prevent any conflict, a transaction will first acquire all the required locks, then perform all the operations. It has two phases:
1. Growing Phase, where a transaction must first acquire all the locks.
2. Shrinking Phase, where a transaction releases all the locks one-by-one.(It cannot issue lock requests here.)

Paper-1 Notes: Series I

I have compiled some notes for Research and Communication Topic. I will post some more notes in near future. Also, I plan to share many important questions with explanation.
Please give your valuable comments on this post. It will help to customise the contents according to what is desired.


Some notes on Research and Communication
The following five phases outline a simple and effective strategy for conducting effective research:
I.   The conceptual phase
II. Phase of construction of research design
III. Empiric phase
IV. Analytic phase
V.  Disseminative phase

DIFF. TYPES OF RESEARCHES
Applied research refers to scientific study and research that seeks to solve practical problems. Applied research is used to find solutions to everyday problems, cure illness, and develop innovative technologies.

Action research is an applied research design used by practitioners (i.e., teachers, administrators, and other school personnel) to solve problems or supply useful information regarding educational policy making and practice at the local level.These types of researches are applied to solve immediate problems.


However, pure science is something with a lab component. Examples are biology, chemistry, physics, anatomy and physiology. Also, an applied science is a science that incorporates many sciences such as fire science or nutrition.

Experimental research is commonly used in sciences such as sociology and psychology, physics, chemistry, biology and medicine etc. It is a collection of research designs which use manipulation and controlled testing to understand causal processes. Generally, one or more variables are manipulated to determine their effect on a dependent variable.

The term descriptive research refers to the type of research question, design, and data analysis that will be applied to a given topic. Descriptive statistics tell what is, while inferential statistics try to determine cause and effect. Descriptive research can be either quantitative or qualitative. It involves gathering data that describe events and then organizes, tabulates, depicts, and describes the data collection. It often uses visual aids such as graphs and charts to aid the reader in understanding the data distribution. The intent of some descriptive research is to produce statistical information about aspects of education that interests policy makers and educators

deductive argument is an argument in which it is thought that the premises provide a guarantee of the truth of the conclusion. In a deductive argument, the premises are intended to provide support for the conclusion that is so strong that, if the premises are true, it would be impossible for the conclusion to be false.
An inductive argument is an argument in which it is thought that the premises provide reasons supporting the probable truth of the conclusion. In an inductive argument, the premises are intended only to be so strong that, if they are true, then it is unlikely that the conclusion is false.
Phenomenology refers to an approach that concentrates on the study of consciousness and the objects of direct experience. OR The discipline of phenomenology may be defined initially as the study of structures of experience, or consciousness. Literally, phenomenology is the study of “phenomena”: appearances of things, or things as they appear in our experience, or the ways we experience things, thus the meanings things have in. The discipline of phenomenology may be defined initially as the study of structures of experience, or consciousness. Literally, phenomenology is the study of “phenomena”: appearances of things, or things as they appear in our experience, or the ways we experience things, thus the meanings things have in our experience.

Probability Sampling:  is any method of sampling that utilizes some form of random selection. In order to have a random selection method, you must set up some process or procedure that assures that the different units in your population have equal probabilities of being chosen. Humans have long practiced various forms of random selection, such as picking a name out of a hat, or choosing the short straw. These days, we tend to use computers as the mechanism for generating random numbers as the basis for random selection.
In this sampling technique, the researcher must guarantee that every individual has an equal opportunity for selection and this can be achieved if the researcher utilizes randomization.

Analysis of Variance: In statistics, analysis of variance (ANOVA) is a collection of statistical models, and their associated procedures, in which the observed variance in a particular variable is partitioned into components attributable to different sources of variation.

Correlational Study:
Sociogram: a sociometric diagram representing the pattern of relationships between individuals in a group, usually expressed in terms of which persons they prefer to associate with.
Sample Questions:
Q An example of asynchronous medium is:
(A) Radio (B) Television    (C) Film (D) Newspaper
Answer is: Newspaper
Explanation:  Asynchronous communication is communication other than in `real-time'-feedback is significantly delayed rather than potentially immediate. This feature ties together the presence or absence of the producer (s) of the text and the technical features of the medium. Asynchronous interpersonal communication is primarily through verbal text (e.g. letters, fax, e-mail). Asynchronous mass communication is primarily through verbal text, graphics and/or audio-visual media (e.g. film, television, radio, newspapers, magazines etc.).

Q In analog mass communication, stories are
(A) static      (B) dynamic          (C) interactive       (D) exploratory
Ans.static ( newspapers, letters, board game etc. are analog while e-mail, web newspaper etc are digital)
Q Which of the following is not an example of a continuous variable?
(A) Family size                     (B) Intelligence                     (C) Height             (D) Attitude
Ans. A
Continuous variables can have an infinite number of different values between two given points. Discrete variables can have only a certain number of different values between two given points. For example, in a family, there can be one, two, or three children, but there cannot be a continuous scale of 1.1, 1.5, or 1.75 children. A variable such as a person's height can take on any value in a range.
Q In the process of conducting research "Formulation of Hypothesis” is followed by
(A) Statement of Objectives               (B) Analysis of Data
(C) Selection of Research Tools        (D) Collection of Data

Q Transforming thoughts, ideas and messages into verbal and non-verbal signs is referred to as
(A) channelisation               (B) mediation        (C) encoding      (D) decoding
At their most basic, transmission models consist of three parts:
1. source  2. channel and  3. receiver
A sender encodes a message, which is transmitted through an appropriate channel (in the case of speech, in a face-to-face interaction, this is air), to a receiver who subsequently decodes the message. A source (a person with a reason for communicating) first accesses his or her communication encoder (a device that manipulates the source’s thoughts into some kind of code) in order to formulate a message. When messages are spoken in face-to-face interactions the channel is the air between the speaker and the listener. In the same way that a source requires an encoder to render his or her thoughts into messages, so a receiver requires a decoder to decipher the message. The receiver is, self-evidently, the person(s) at the end of the channel. Put another way, a person (source) formulates an idea – a concept – and encodes this concept linguistically, i.e. into strings of sounds, syllables and words, then transmits this encoded thought as a sound wave, whereupon another person (receiver) decodes the sound wave back into the original concept.