Unit 6 - Practice Quiz

CSC202

1 What is the primary definition of Infrastructure as Code (IaC)?

A. Managing physical hardware through manual wiring.
B. Managing and provisioning computer data centers through machine-readable definition files.
C. Writing code to build software applications only.
D. The process of installing operating systems manually using ISO files.

2 In the context of IaC, what does Idempotency mean?

A. The code runs faster every time it is executed.
B. The code deletes the infrastructure after execution.
C. The result of executing the code multiple times is the same as executing it once.
D. The code changes the server configuration randomly.

3 Which of the following describes a Declarative approach to IaC?

A. Defining the specific commands to achieve a configuration (e.g., run this, then run that).
B. Defining the desired state of the system, leaving the 'how' to the tool.
C. Manually clicking through a GUI to set up a server.
D. Writing a shell script with strict if-then logic.

4 What is Configuration Drift?

A. The process of moving servers from one physical location to another.
B. When the actual configuration of a server diverges from the defined IaC template.
C. The speed at which code is deployed to production.
D. Migrating from a virtual machine to a container.

5 Which concept refers to replacing infrastructure rather than updating it in place?

A. Mutable Infrastructure
B. Immutable Infrastructure
C. Legacy Infrastructure
D. Physical Infrastructure

6 Which of the following is primarily considered an Infrastructure Provisioning tool?

A. Terraform
B. Git
C. Jenkins
D. Nagios

7 Which of the following is primarily considered a Configuration Management tool?

A. Terraform
B. Ansible
C. Docker
D. VMware ESXi

8 In IaC, what is the role of Version Control?

A. To speed up the internet connection of the server.
B. To track changes, collaborate on code, and roll back configurations if necessary.
C. To compile binary files for the operating system.
D. To manage the power supply of the data center.

9 What is the Push Model in configuration management?

A. Nodes periodically check a central server for updates.
B. A central server initiates the connection to nodes to apply configurations.
C. Developers push code to a Git repository.
D. Users push buttons to start servers.

10 What is the Pull Model in configuration management?

A. Agents on the nodes periodically poll a central server for configuration updates.
B. Administrators manually pull cables to reset servers.
C. The server pulls data from the internet.
D. A master node forces updates onto the clients immediately.

11 What is Git?

A. A centralized file storage server.
B. A Distributed Version Control System (DVCS).
C. A programming language for system administration.
D. A container orchestration tool.

12 Which command initializes a new Git repository?

A. git start
B. git new
C. git init
D. git create

13 Which command allows you to view the status of files in the working directory and staging area?

A. git log
B. git info
C. git status
D. git show

14 What is the Staging Area in Git?

A. The production server where code is deployed.
B. A file in the .git directory that stores information about what will go into your next commit.
C. The remote repository on GitHub.
D. A backup folder on an external drive.

15 Which command is used to record changes to the repository?

A. git save
B. git commit
C. git push
D. git record

16 How do you download an existing remote repository to your local machine?

A. git copy
B. git mirror
C. git clone
D. git download

17 What is the purpose of a Branch in Git?

A. To delete old code.
B. To diverge from the main line of development and continue work without messing with that main line.
C. To connect to a remote server.
D. To compile the code.

18 Which command combines a specific branch into the current branch?

A. git combine
B. git join
C. git merge
D. git fuse

19 What is the difference between git pull and git fetch?

A. git pull only downloads data; git fetch downloads and merges.
B. git fetch downloads data to your local repo but does not merge it; git pull downloads and merges.
C. They are identical commands.
D. git fetch deletes remote branches.

20 What is the function of the .gitignore file?

A. It lists files that Git should delete.
B. It stores the user's password.
C. It specifies intentionally untracked files to ignore.
D. It ignores all git commands in a specific folder.

21 What is the core concept of Virtualization?

A. Running multiple operating systems simultaneously on a single physical machine.
B. Connecting multiple physical machines to act as one.
C. Running software without an operating system.
D. Compressing files to save space.

22 What is a Hypervisor?

A. A high-speed processor.
B. Software that creates and runs virtual machines.
C. A monitor with high resolution.
D. The administrator account on a Linux server.

23 Which of the following defines a Type 1 Hypervisor?

A. It runs as an application inside a host operating system.
B. It runs directly on the system's hardware (Bare Metal).
C. It is used primarily for desktop virtualization.
D. It requires Windows to run.

24 Which of the following is an example of a Type 2 Hypervisor?

A. VMware ESXi
B. Xen
C. Oracle VirtualBox
D. Microsoft Hyper-V Server

25 In virtualization, what is the Host OS?

A. The operating system running inside the virtual machine.
B. The physical computer's operating system upon which a Type 2 hypervisor runs.
C. The operating system used to browse the internet.
D. The cloud provider's billing system.

26 What is a Container?

A. A heavy virtual machine with its own kernel.
B. A standard unit of software that packages up code and all its dependencies.
C. A physical box used to ship servers.
D. A database storage unit.

27 What is the key difference between Virtual Machines (VMs) and Containers?

A. Containers virtualize the hardware; VMs virtualize the OS.
B. VMs include a full OS; Containers share the host OS kernel.
C. Containers differ only in color; functionally they are the same.
D. VMs are faster to boot than containers.

28 Which Linux kernel feature allows containers to have their own isolated view of the system (Process IDs, Mounts, Networks)?

A. Hypervisors
B. Namespaces
C. Drivers
D. Interrupts

29 Which Linux kernel feature is used to limit the resource usage (CPU, Memory) of a container?

A. cgroups (Control Groups)
B. Symlinks
C. Inodes
D. Tables

30 What is Docker?

A. A hardware manufacturer.
B. A platform for developing, shipping, and running applications in containers.
C. A new programming language.
D. A virtualization hypervisor for Windows only.

31 What is a Dockerfile?

A. A text document that contains all the commands to assemble a Docker image.
B. A compiled binary file.
C. A log file generated by a container.
D. The main configuration file for the Docker daemon.

32 In a Dockerfile, what does the FROM instruction do?

A. Sends an email from the container.
B. Initializes a new build stage and sets the Base Image.
C. Copies files from the host.
D. Exposes a network port.

33 Which command is used to create an image from a Dockerfile?

A. docker create
B. docker run
C. docker build
D. docker compile

34 Which command starts a container from an image?

A. docker start-image
B. docker run
C. docker execute
D. docker boot

35 What is a Docker Registry?

A. A list of all active containers on a host.
B. A stateless, highly scalable server side application that stores and lets you distribute Docker images.
C. A specialized CPU register for containers.
D. The registration form to use Docker.

36 What is Container Orchestration?

A. Writing music for containers.
B. The automated arrangement, coordination, and management of complex computer systems and services (containers).
C. Manually starting containers one by one.
D. The process of deleting old containers.

37 Which of the following is the most popular open-source container orchestration system?

A. VirtualBox
B. Kubernetes
C. Git
D. Ansible

38 In Docker, what is a Volume used for?

A. Adjusting the sound level of the application.
B. Persisting data generated by and used by Docker containers.
C. Measuring the size of the container.
D. Networking multiple containers.

39 What is Docker Compose?

A. A tool for defining and running multi-container Docker applications.
B. A musical tool for developers.
C. A replacement for the Linux kernel.
D. A virus scanner for containers.

40 When deploying a container, what does 'Port Mapping' (e.g., -p 8080:80) do?

A. It connects two containers together internally.
B. It maps a port on the host machine to a port inside the container.
C. It blocks traffic on port 8080.
D. It speeds up network traffic.

41 What defines a Microservices Architecture?

A. Building an application as a single, monolithic unit.
B. Structuring an application as a collection of loosely coupled, independently deployable services.
C. Using very small servers.
D. Writing code in Assembly language.

42 Which of the following represents a mathematical representation of Virtualization Efficiency () if is resources used and is total resources?

A.
B.
C.
D.

43 What is Paravirtualization?

A. A technique where the guest OS is unmodified.
B. A technique where the guest OS is modified to communicate with the hypervisor for better performance.
C. Virtualization that only works on parallel ports.
D. Running two hypervisors side by side.

44 What is a Snapshot in virtualization?

A. A picture of the physical server.
B. A copy of the virtual machine's disk file (VMDK) and memory state at a specific point in time.
C. A short video of the VM booting.
D. A printout of the code.

45 What is Live Migration (e.g., vMotion)?

A. Moving a physical server while it is running.
B. Moving a running virtual machine from one physical host to another without downtime.
C. Copying files from one folder to another.
D. Installing an OS while the computer is on.

46 In the context of container deployment, what is the 'Golden Image' concept?

A. The most expensive version of Docker.
B. A master image that is pre-configured, secured, and used as a template for all containers.
C. An image painted in gold color.
D. The default background image of the OS.

47 What is the primary benefit of Layering in Docker images?

A. It makes images heavier.
B. It allows caching and reuse of common layers, speeding up builds and reducing storage.
C. It encrypts the data.
D. It creates a graphical user interface.

48 Which Git command is used to fix a merge conflict after you have manually resolved the file contents?

A. git conflict resolved
B. git add <filename>
C. git fix
D. git clean

49 If a system has physical cores and uses hyper-threading (2 threads per core), how many vCPUs are generally available for virtualization?

A.
B.
C.
D.

50 What is the main security concern regarding Privileged Containers?

A. They cost more money.
B. They grant the container root capabilities on the host machine, bypassing isolation.
C. They cannot access the internet.
D. They are too slow.