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 Avoidance
B. Deadlock Prevention
C. Deadlock Detection
D. Deadlock Recovery

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

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

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. The system is in an unsafe state.
B. No deadlock exists.
C. A deadlock exists.
D. A deadlock may exist.

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

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

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

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

8 Which of the following describes 'Starvation'?

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

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

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

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

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

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

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

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

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

13 The 'Principle of Least Privilege' states that:

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

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

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

15 What is 'Cache Poisoning'?

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

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

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

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

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

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

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

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

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

20 A 'Logic Bomb' is:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

30 What is 'Stack Smashing'?

A. Physical damage to the CPU stack.
B. Compressing the stack to save memory.
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. Infects multiple operating systems.
D. Cannot be removed.

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

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

33 Which of the following best describes 'Phishing'?

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

34 In the Lock-Key mechanism for access control:

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

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

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

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

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

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. Starvation
D. Circular Wait

38 Secure communication over a network often relies on:

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

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

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

40 A 'Stealth Virus' attempts to:

A. Encrypt the hard drive.
B. Hide its presence from the OS and antivirus software.
C. Delete the boot sector immediately.
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 allows everyone to access everything.
B. The table can become extremely large and cannot be kept in main memory.
C. It does not support file permissions.
D. It is too secure.

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. Latency
B. Starvation
C. Throughput
D. Mutual Exclusion

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

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

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

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

45 The 'Confidentiality' aspect of security ensures that:

A. The system is always running.
B. Assets can only be modified by authorized parties.
C. Assets are accessible only to authorized parties.
D. Assets are accessible to 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 exploiting a vulnerability before the developer knows about it or has a fix.
D. An attack using 0s and 1s.

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

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

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

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

49 What is 'Network Sniffing'?

A. Cleaning the network cables.
B. Smelling the hardware for burning components.
C. Monitoring and capturing data packets passing through a network.
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. Authentication
B. Confidentiality
C. Availability
D. Integrity