Question examples Flashcards

(16 cards)

1
Q

What information defines a UDP socket?
a. Source IP address
b. Source port number
c. Destination IP address
d. Destination port number

A

d. Destination port number (UDP is connectionless; only the destination port matters)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do processes exchange when communicating in different end systems?
a. Memory
b. Files
c. Messages
d. Protocols

A

c. Messages (Processes communicate via messages, e.g. HTTP requests/responses)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following is(are) TCP/IP layer(s)?
a. Network
b. Session
c. Application
d. Transport

A

a,c,d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which command deletes a directory and all its contents?
a. mkdir
b. rm -r
c. cp -r
d. rmdir

A

b. rm -r (Recursive delete; rmdir only remove empty directories)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

‘What is the server’s response to the HTTP GET request?
a. 200 OK
b. 404 Not Found
c. 401 Unauthorised
d. 403 Forbidden

A

a. 200 OK (Default success response for valid GET requests)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is it called when processes wait indefinitely for an event caused by another waiting process?
a. Starvation
b. Priority inversion
c. Deadlock
d. Blocking

A

c. Deadlock (Circular dependency; no progress possible)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following are program threats?
a. Viruses
b. Worms
c. Port scanning
d. Trojan horse

A

a,b,d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which protocol provides connection-oriented communication?
a. UDP
b. TCP
c. ICMP
d. HTTP

A

b. TCP (TCP is reliable/connection-oriented; UDP is connectionless)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What ensures only one process executes its critical section at a time?
a. Deadlock
b. Semaphore
c. Starvation
d. Fragmentation

A

b. Semaphore (Sync tool to enforce mutual exclusion)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which is a key difference between IPv4 and IPv6?
a. IPv6 uses shorter addresses
b. IPv6 eliminates fragmentation
c. IPv4 supports more devices
d. IPv6 removes checksums

A

b. IPv6 eliminates fragmentation (handled by endpoints, not routers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which is NOT a Java thread state?
a. NEW
b. RUNNABLE
c. SLEEPABLE
d. TERMINATED

A

c. SLEEPING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which uses the same key for encryption and decryption?
a. RSA
b. AES
c. Diffie-Hellman
d. PGP

A

b. AES (Symmetric encryption; others are asymmetric)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What sync mechanism solves the producer-consumer problem?
a. Mutex
b. Monitor
c. Both a and b
d. Neither

A

c. Both a and b (Mutex locks, Monitors can enforce buffer access rules)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Discuss how two processes communicate over a network. Include sockets, ports, IP address and transport services

A
  1. Sockets: Endpoints for communication (IP + port)
  2. Ports: Identify processes (e.g. HTTP = port 80)
  3. IP Addresses: Locate hosts (e.g. 192.168.1.1)
  4. Transport Services: TCP (reliable), UDP (unreliable)
  5. E.g. Web browser (client) uses TCP to connect to a server’s socket (IP: port)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are system programs? Differentiate from applications and discuss 5 categories.

A
  1. Definition: Software managing hardware/resources (e.g., OS utilities)
  2. vs. Application: System programs- OS level (e.g. disk formatter), Applications- User level (e.g. web browser)
  3. Categories: File management (ls, cp), Process control (kill, ps), System monitoring (top), Programming tools (compilers), Communication (SSH, pipes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Discuss 3 types of program threats with examples

A
  1. Virus: Attaches to files (e.g., macro virus in Word docs).
  2. Worm: Self-replicating (e.g., Morris Worm, 1988).
  3. Trojan Horse: Disguised malware (e.g., fake game installer).