← Back to 14. Protection

📝 Compiler Based Language Enforcement protection

📖 From Operating System • 14. Protection • 28 questions available

Practice MCQs for Compiler Based Language Enforcement protection. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

🔄 Last updated: 2026-07-27

6
Easy Questions
14
Medium Questions
8
Hard Questions

📝 Sample Questions

Q1. What is the term for compile‑time checking that ensures a program adheres to security policies?

🔹 A. Static analysis
🔹 B. Dynamic analysis
🔹 C. Runtime monitoring
🔹 D. Code obfuscation

💡 Difficulty: easy | ✅ Correct: A

Q2. How does the concept of abstract data types (ADTs) support compiler‑based enforcement of protection policies?

🔹 A. ADTs hide implementation details, allowing the compiler to treat all operations uniformly
🔹 B. ADTs provide built‑in encryption for data fields
🔹 C. ADTs force all functions to be pure and side‑effect free
🔹 D. ADTs automatically generate access‑control lists at compile time

💡 Difficulty: medium | ✅ Correct: A

Q3. Explain how the principle of least privilege is realized through compiler‑based enforcement in a language with linear types.

🔹 A. Linear types force every variable to be immutable, which automatically limits privileges
🔹 B. Linear types ensure that resources are used exactly once, preventing duplication and unintended sharing, so the compiler can guarantee that only the code that explicitly receives a capability can access the resource
🔹 C. Linear types encrypt all data, ensuring least privilege
🔹 D. Linear types remove the need for any runtime checks

💡 Difficulty: hard | ✅ Correct: B

⬆️ View all questions in the quiz below

🔗 Related Topics

📝 Goals of Protection in Operating System📝 Principles of Protection in Operating System📝 Domain of Protection in Operating System📝 Domain structure for protection in Operating System📝 UNIX example of protection in Operating System
🚀 Start Quiz 📝 Practice Mode