Unit 4: Deadlock, Protection and Security - Practice Quiz

CSE316 — Operating Systems 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which of the following is NOT a necessary condition for a deadlock to occur?

A. Hold and Wait
B. Preemption
C. Circular Wait
D. Mutual Exclusion

2 Which deadlock handling strategy involves ensuring that at least one of the necessary conditions for deadlock cannot hold?

A. Deadlock Prevention
B. Deadlock Recovery
C. Deadlock Detection
D. Deadlock Avoidance

3 The Banker’s Algorithm is used for which purpose in an Operating System?

A. Deadlock Detection
B. Deadlock Prevention
C. Deadlock Recovery
D. Deadlock Avoidance

4 A system is in a 'safe state' if:

A. All resources are currently free.
B. There exists a safe sequence of all processes.
C. No process is waiting for resources.
D. There is no deadlock.

5 In a Resource Allocation Graph, if the graph contains no cycles, then:

A. A deadlock exists.
B. No deadlock exists.
C. A deadlock may exist.
D. The system is in an unsafe state.

6 Which technique addresses the 'Circular Wait' condition to prevent deadlock?

A. Allowing preemption
B. Spooling resources
C. Imposing a total ordering of all resource types
D. Requesting all resources at the start

7 What is the primary difference between a Virus and a Worm?

A. A virus spreads via network only; a worm spreads via disk.
B. A virus is harmless; a worm is malicious.
C. A virus requires a host program to spread; a worm can replicate independently.
D. A worm infects hardware; a virus infects software.

8 Which of the following describes 'Starvation'?

A. Two processes waiting indefinitely for each other.
B. A security breach in the kernel.
C. The system crashing due to memory overload.
D. A process waiting indefinitely because other processes are constantly favored.

9 A 'Trapdoor' (or Backdoor) in a system is:

A. A protocol for secure file transfer.
B. A hardware failure.
C. A type of antivirus software.
D. A mechanism to bypass security controls.

10 Which attack involves overwriting a memory area to corrupt data or execute malicious code?

A. Buffer Overflow
B. Denial of Service
C. Sniffing
D. Phishing

11 Which component of the Access Matrix model represents the protection domain?

A. The file system
B. The row
C. The intersection cell
D. The column

12 Implementing an Access Matrix by storing list of objects and rights with each domain is known as:

A. Lock-key mechanism
B. Access Control List (ACL)
C. Capability List
D. Global Table

13 The 'Principle of Least Privilege' states that:

A. Programs and users should be given just enough privileges to perform their task.
B. All users should have the same privilege level.
C. Security should be handled only by the OS kernel.
D. Users should have maximum access to ensure efficiency.

14 Which of the following is a method for Deadlock Recovery?

A. Banker's Algorithm
B. Wait-for Graph
C. Process Termination
D. Ordering Resources

15 What is 'Cache Poisoning'?

A. Physically damaging the cache memory.
B. Introducing false information into a DNS or ARP cache.
C. Filling the cache so no valid data can be stored.
D. Encrypting the cache so the CPU cannot read it.

16 In the context of Deadlock Detection with single instances of each resource type, which structure is used?

A. Banker's Matrix
B. Wait-for Graph
C. Gantt Chart
D. Access Control List

17 Which of the following is an example of a 'Program Threat'?

A. Phishing email
B. Dumpster diving
C. Shoulder surfing
D. Trojan Horse

18 The practice of adding a random string to a password before hashing it is called:

A. Phishing
B. Snooping
C. Spoofing
D. Salting

19 Which recovery method involves rolling back a process to a safe checkpoint?

A. Process Termination
B. Mutual Exclusion
C. Starvation
D. Resource Preemption

20 A 'Logic Bomb' is:

A. A type of firewall.
B. A virus that spreads via email.
C. A hardware malfunction.
D. Code embedded in a legitimate program that executes when specific conditions are met.

21 In an Access Control List (ACL) implementation, the permissions are associated with:

A. The Object (File/Resource)
B. The Network
C. The Operating System
D. The Domain (User)

22 Which of the following is a goal of Protection in an OS?

A. To ensure that resources are used only by those processes that have proper authorization.
B. To prevent the user from installing applications.
C. To increase CPU speed.
D. To maximize memory fragmentation.

23 What is the 'Ostrich Algorithm' in the context of deadlocks?

A. Avoiding the deadlock using probabilities.
B. Preventing the deadlock strictly.
C. Detecting the deadlock and recovering.
D. Ignoring the deadlock problem altogether.

24 Which attack attempts to guess a password by trying every possible combination of characters?

A. Trojan Horse
B. Dictionary Attack
C. Brute Force Attack
D. Phishing

25 What is a 'Denial of Service' (DoS) attack?

A. Injecting a virus into the boot sector.
B. Preventing legitimate users from accessing a system or network.
C. Stealing user passwords.
D. Encrypting user data for ransom.

26 The 'Need-to-Know' principle suggests:

A. Users must know everything about the system.
B. Security is not necessary for internal networks.
C. All files should be readable by everyone.
D. A process should only have access to resources currently required for its task.

27 Which of the following is NOT a standard method for user authentication?

A. Something the user is (Biometrics)
B. Something the user has (Smart card)
C. Something the user wants (Desire)
D. Something the user knows (Password)

28 In the context of protection, a 'Domain' implies:

A. A website address.
B. The type of operating system used.
C. A set of access rights/privileges.
D. A physical location of the server.

29 Which deadlock prevention strategy denies the 'Hold and Wait' condition?

A. Using the Banker's Algorithm.
B. Requiring a process to request all resources before execution begins.
C. Ordering resources numerically.
D. Preempting resources from a process.

30 What is 'Stack Smashing'?

A. Compressing the stack to save memory.
B. Physical damage to the CPU stack.
C. Deleting the stack pointer.
D. A form of buffer overflow attack targeting the stack.

31 A 'Polymorphic Virus' is one that:

A. Only attacks graphics files.
B. Changes its signature or code every time it replicates to avoid detection.
C. Cannot be removed.
D. Infects multiple operating systems.

32 What does 'Mutual Exclusion' mean in the context of deadlock?

A. Resources can be preempted.
B. Processes wait in a circle.
C. At least one resource must be held in a non-sharable mode.
D. Processes must share all resources.

33 Which of the following best describes 'Phishing'?

A. Intercepting Wi-Fi signals.
B. Guessing passwords using a dictionary.
C. Social engineering via email/web to steal credentials.
D. Flooding a network with traffic.

34 In the Lock-Key mechanism for access control:

A. The OS uses a master password.
B. Every user has a physical key.
C. Each object has a list of unique bit patterns (locks) and domains have patterns (keys).
D. It is identical to an Access Control List.

35 One-Time Passwords (OTP) are used to primarily prevent:

A. Buffer overflows.
B. Virus infections.
C. Deadlocks.
D. Replay attacks.

36 Which of the following is a 'System Threat' rather than a 'Program Threat'?

A. Trapdoor
B. Virus
C. Worm
D. Trojan Horse

37 If a process P1 is holding Resource R1 and waiting for R2, and P2 is holding R2 and waiting for R1, this is an example of:

A. Preemption
B. Safe State
C. Circular Wait
D. Starvation

38 Secure communication over a network often relies on:

A. Encryption and Cryptography.
B. Short passwords.
C. Faster routers.
D. Open access points.

39 Man-in-the-middle (MitM) attack involves:

A. An attacker destroying the server hardware.
B. An attacker secretly relaying and possibly altering communication between two parties.
C. An attacker guessing the password.
D. An attacker locking the database.

40 A 'Stealth Virus' attempts to:

A. Delete the boot sector immediately.
B. Encrypt the hard drive.
C. Hide its presence from the OS and antivirus software.
D. Make the screen go black.

41 Which of the following is a weakness of the Global Table implementation of the Access Matrix?

A. It is too secure.
B. It does not support file permissions.
C. The table can become extremely large and cannot be kept in main memory.
D. It allows everyone to access everything.

42 When a system recovers from deadlock by rolling back a process, what issue must be addressed to prevent the same process from being picked repeatedly?

A. Throughput
B. Mutual Exclusion
C. Latency
D. Starvation

43 What is the main disadvantage of Deadlock Detection compared to Deadlock Prevention?

A. It requires user intervention.
B. It requires runtime overhead to run the detection algorithm.
C. It restricts resource usage.
D. It never finds deadlocks.

44 In protection systems, switching from one domain to another (Domain Switching) typically happens when:

A. A file is deleted.
B. A process calls a system call or changes privilege level.
C. The computer is restarted.
D. A user logs out.

45 The 'Confidentiality' aspect of security ensures that:

A. The system is always running.
B. Assets are accessible only to authorized parties.
C. Assets are accessible to authorized parties.
D. Assets can only be modified by authorized parties.

46 Which of the following is an example of a 'Day Zero' or 'Zero-Day' attack?

A. An attack that happens at midnight.
B. An attack that deletes 0 bytes.
C. An attack using 0s and 1s.
D. An attack exploiting a vulnerability before the developer knows about it or has a fix.

47 Password 'Salting' makes which specific type of attack much more difficult?

A. Social Engineering
B. Brute Force
C. Phishing
D. Dictionary Attack using Rainbow Tables

48 In the context of Application Security, 'Input Validation' helps prevent:

A. Deadlock
B. Packet Sniffing
C. Buffer Overflow and SQL Injection
D. Starvation

49 What is 'Network Sniffing'?

A. Monitoring and capturing data packets passing through a network.
B. Smelling the hardware for burning components.
C. Cleaning the network cables.
D. Speeding up the network connection.

50 Which concept ensures that a modification to a system asset is done only in an authorized manner?

A. Availability
B. Confidentiality
C. Integrity
D. Authentication