Unit 4 - Practice Quiz

CSE316

1 Which of the following creates a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process?

A. Starvation
B. Deadlock
C. Synchronization
D. Aging

2 According to the Coffman conditions, which of the following is NOT a necessary condition for a deadlock to occur?

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

3 In a Resource Allocation Graph (RAG), if the graph contains no cycles, which of the following statements is true?

A. A deadlock exists
B. No deadlock exists
C. The system is in an unsafe state
D. Starvation is occurring

4 The strategy of ignoring the problem of deadlock altogether and pretending that deadlocks never occur in the system is known as:

A. Banker's Algorithm
B. Ostrich Algorithm
C. Deadlock Avoidance
D. Deadlock Prevention

5 To prevent Hold and Wait, which of the following protocols can be used?

A. Processes must request resources in a strictly increasing order
B. Processes must request and be allocated all resources before execution
C. Resources can be preempted from processes
D. Resources are virtualized

6 Deadlock Avoidance algorithms require the operating system to have which of the following information in advance?

A. The maximum number of resources of each type that each process may need
B. The exact order of execution
C. The priority of all processes
D. The password for every user

7 In the context of the Banker's Algorithm, a state is considered safe if:

A. There exists a cycle in the resource allocation graph
B. There exists a sequence of all processes such that each process can satisfy its maximum demand
C. All resources are currently free
D. No process is waiting for resources

8 Given processes through , the Banker's Algorithm uses several data structures. If is the maximum demand and is the amount currently allocated, how is calculated?

A.
B.
C.
D.

9 Which data structure is typically used for deadlock detection in a system with only a single instance of each resource type?

A. Resource Allocation Graph
B. Wait-for Graph
C. Gantt Chart
D. Access Matrix

10 When recovering from a deadlock by process termination, what is a primary criterion for selecting a 'victim' process?

A. The process name
B. The amount of CPU time the process has used so far (cost of rollback)
C. The time of day
D. The size of the process name

11 What is the phenomenon called where a process waits indefinitely for a resource because other processes are constantly preempting it or having higher priority?

A. Deadlock
B. Livelock
C. Starvation
D. Protection

12 Which technique helps in solving the problem of Starvation?

A. Mutual Exclusion
B. Aging
C. Hold and Wait
D. Spoofing

13 In the context of Operating Systems, what is the primary difference between Protection and Security?

A. Protection deals with internal threats; Security deals with external threats
B. Protection handles external attacks; Security handles access rights
C. There is no difference
D. Protection is for hardware; Security is for software

14 The Principle of Least Privilege dictates that:

A. Users should be given the highest level of access by default
B. Programs, users, and systems should be given just enough privileges to perform their task
C. Security mechanisms should be complex to deter attackers
D. All users should have administrator rights

15 A protection domain specifies:

A. A set of users
B. A set of objects and the operations that may be performed on those objects
C. A list of passwords
D. The physical location of the server

16 In an Access Matrix model, the rows represent __ and the columns represent __.

A. Objects, Domains
B. Domains, Objects
C. Users, Passwords
D. Files, Processes

17 Which implementation of the Access Matrix corresponds to storing the non-empty entries of the matrix by column (associating permissions with the object)?

A. Capability Lists
B. Access Control Lists (ACL)
C. Global Table
D. Lock-Key Mechanism

18 A Capability List is associated with:

A. Each Object
B. Each Domain (Process)
C. The Operating System Kernel only
D. The Network Interface

19 What is a Buffer Overflow vulnerability?

A. When a process writes more data to a fixed-length buffer than the buffer can hold
B. When the CPU cache fills up
C. When the network bandwidth is exceeded
D. When a disk runs out of space

20 A code segment embedded in a legitimate program that is designed to 'explode' or execute a malicious function when certain conditions are met is called a:

A. Virus
B. Logic Bomb
C. Worm
D. Trap Door

21 A Trapdoor (or Backdoor) is:

A. A hardware failure
B. A method of bypassing normal authentication methods
C. A type of firewall
D. A physical lock on a server room

22 Which of the following describes a Trojan Horse?

A. A self-replicating program that spreads over a network
B. A program that appears useful but contains hidden malicious code
C. A technique to guess passwords
D. A denial of service attack

23 What distinguishes a Worm from a Virus?

A. A worm requires a host program to spread, a virus does not
B. A worm is a standalone program that replicates itself over a network; a virus attaches to a host program
C. A worm only attacks hardware
D. There is no difference

24 In Password-based Authentication, what is the purpose of 'salting' the password?

A. To make the password shorter
B. To ensure that the same password results in different hash values
C. To encrypt the connection
D. To allow the user to see the password

25 Which attack involves an attacker sitting between two communicating parties and intercepting/modifying the data?

A. Denial of Service
B. Man-in-the-Middle (MitM)
C. Phishing
D. Buffer Overflow

26 Cache Poisoning typically affects which network service?

A. DNS (Domain Name System)
B. FTP (File Transfer Protocol)
C. SSH (Secure Shell)
D. Telnet

27 A Denial of Service (DoS) attack aims to:

A. Steal sensitive data
B. Gain administrative access
C. Disrupt the legitimate use of a system or network
D. Encrypt user files

28 Which of the following is an example of Social Engineering?

A. Phishing
B. Port Scanning
C. Packet Sniffing
D. SQL Injection

29 In the context of Deadlock Prevention, the condition of Circular Wait can be eliminated by:

A. Using semaphores
B. Defining a linear ordering of resource types
C. Using time-sharing
D. Allowing preemption

30 If a system is in an Unsafe State, it implies that:

A. A deadlock has definitely occurred
B. A deadlock may occur
C. The system will crash immediately
D. The system is secure

31 What is Stack Smashing?

A. A method to compress the stack
B. A form of buffer overflow targeting the stack to modify the return address
C. Optimizing stack memory usage
D. Deleting the stack

32 Which of the following is NOT a goal of protection?

A. Preventing malicious misuse of the system
B. Ensuring efficient use of resources
C. Enforcing usage policies
D. Increasing the clock speed of the CPU

33 In the Lock-Key mechanism for implementing access rights:

A. Each object has a list of unique bit patterns (locks) and each domain has a list of unique bit patterns (keys)
B. Keys are public
C. Locks are managed by the user
D. It is identical to ACL

34 Port Scanning is used by attackers to:

A. Physically steal a server
B. Identify which services are running on a target system
C. Encrypt a hard drive
D. Overheat the CPU

35 Which term describes a virus that changes its own code (signature) each time it infects a new host to avoid detection?

A. Polymorphic Virus
B. Macro Virus
C. Boot Sector Virus
D. Stealth Virus

36 What is the Confinement Problem in protection?

A. Ensuring a process cannot migrate to another CPU
B. Ensuring that information contained in an object does not leak outside the system
C. Keeping the CPU temperature low
D. Limiting the number of users

37 In a resource allocation graph, a request edge is directed from:

A. Resource to Process
B. Process to Resource
C. Process to Process
D. Resource to Resource

38 Which deadlock recovery method involves rolling back a process to a safe state and restarting it?

A. Process Termination
B. Resource Preemption
C. Prevention
D. Exclusion

39 In One-Time Password (OTP) systems, the security relies on:

A. The password being used only once and then becoming invalid
B. The password being extremely long
C. The password being the user's name
D. Biometrics only

40 The CIA triad in security stands for:

A. Confidentiality, Integrity, Availability
B. Control, Intelligence, Authentication
C. Computer, Internet, Access
D. Code, Input, Algorithm

41 A Dumpster Diving attack involves:

A. Hacking into the recycle bin folder
B. Scavenging through physical trash to find sensitive information
C. Deleting files randomly
D. Overwriting memory buffers

42 Which of the following is a passive attack?

A. Packet Sniffing
B. Data Modification
C. Denial of Service
D. Masquerading

43 With respect to Deadlock, what is Mutual Exclusion?

A. Processes must share resources simultaneously
B. At least one resource must be held in a non-sharable mode
C. All resources are sharable
D. No process can access any resource

44 If a system has 3 processes and 4 instances of Resource R, and each process needs 2 instances of R to complete, will deadlock occur?

A. Yes, definitely
B. No, never
C. Maybe
D. Only if preemption is disabled

45 Which of the following describes the Wait-for graph properly?

A. It is obtained by removing resource nodes and collapsing edges from the Resource Allocation Graph
B. It includes both process and resource nodes
C. It is used for multiple instances of resources
D. It shows the memory usage of processes

46 In the Access Matrix, the Switch right allows:

A. A process to delete a domain
B. A process to switch from one domain to another
C. A process to switch off the computer
D. A process to edit a file

47 What is Spyware?

A. Software that encrypts files
B. Software that secretly gathers information about a user and sends it to a third party
C. Software that speeds up the computer
D. A type of firewall

48 What is the primary vulnerability exploited by a Zero-Day Attack?

A. Weak passwords
B. Unpatched software vulnerabilities unknown to the vendor
C. Physical theft
D. Phishing

49 Which of the following is an example of an Authentication mechanism?

A. Access Control List
B. Encryption
C. Biometrics (Fingerprint)
D. Firewall

50 The Banker's Algorithm is applicable for:

A. Systems with single instance of each resource type
B. Systems with multiple instances of each resource type
C. Systems without resources
D. Network routing