1. Home
  2. Explore
  3. Other
  4. Lecture Recording Access

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Lecture Recording Access

  • 26Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: User Interfaces

What is the primary advantage of a command-line interface (CLI) over a graphical user interface (GUI)?

26 questions

  1. 1

    What is the primary advantage of a command-line interface (CLI) over a graphical user interface (GUI)?

    1. A

      CLIs provide graphical feedback like icons and menus.

    2. B

      CLIs are faster and use fewer system resources.

    3. C

      CLIs can only run one program at a time.

    4. D

      CLIs are easier for new users to learn.

    Correct answer
    B

    CLIs are faster and use fewer system resources.

    Explanation

    CLIs are fast and efficient but require knowledge of commands. GUIs are resource-intensive but easier to use. The lecture notes that CLIs are 'very fast and want to know how to use them' but take fewer system resources than GUIs.

  2. 2

    In what scenario is a batch system typically used?

    1. A

      Playing a video game that requires instant responses.

    2. B

      Running overnight bank transactions to process all supermarket data.

    3. C

      Editing a document with a mouse and keyboard in real time.

    4. D

      Browsing the internet with multiple tabs open.

    Correct answer
    B

    Running overnight bank transactions to process all supermarket data.

    Explanation

    Batch systems schedule jobs to run at off-peak times, like overnight, to use system resources efficiently. The lecture mentions banks processing supermarket transactions overnight.

  3. 3

    Which of the following is an example of a command that is built into the operating system in Windows?

    1. A

      LS

    2. B

      DIR

    3. C

      Python

    4. D

      Ping

    Correct answer
    B

    DIR

    Explanation

    The lecture states that DIR is built into Windows to list files. Python is a separate program, LS is a Unix command, and Ping is a network utility often external, though it can be built-in.

  4. 4

    Which OS service is responsible for preventing a divide-by-zero operation from crashing the system?

    1. A

      Resource allocation

    2. B

      Error detection

    3. C

      Accounting

    4. D

      File system management

    Correct answer
    B

    Error detection

    Explanation

    The lecture says the operating system catches errors like divide by zero and stops them, which is part of error detection.

  5. 5

    When two processes request to use the printer simultaneously, which OS service resolves the conflict?

    1. A

      File system management

    2. B

      Accounting

    3. C

      Error detection

    4. D

      Resource allocation

    Correct answer
    D

    Resource allocation

    Explanation

    Resource allocation decides who gets access to devices like the printer, as described in the lecture: 'the operating system has to decide who goes in first'.

  6. 6

    What does the accounting service in an operating system enable?

    1. A

      Providing error messages to users.

    2. B

      Allocating CPU time to processes.

    3. C

      Organizing files on storage devices.

    4. D

      Tracking resource usage and charging back to departments.

    Correct answer
    D

    Tracking resource usage and charging back to departments.

    Explanation

    The lecture mentions accounting counts CPU cycles or storage usage so that departments can be charged, similar to charging for a room.

  7. 7

    How does an operating system enforce protection and security?

    1. A

      By requiring login credentials and controlling access to files.

    2. B

      By providing a command-line interface only.

    3. C

      By running all programs in a single memory space.

    4. D

      By disabling multitasking capabilities.

    Correct answer
    A

    By requiring login credentials and controlling access to files.

    Explanation

    The lecture explains that login credentials and file permissions control access, e.g., students can't see the lecturer's files unless given access.

  8. 8

    What does an API provide to user programs?

    1. A

      A graphical user interface for the program.

    2. B

      A set of system calls to interact with the OS.

    3. C

      A direct connection to the hardware.

    4. D

      A batch processing system.

    Correct answer
    B

    A set of system calls to interact with the OS.

    Explanation

    The lecture defines API as an application program interface that provides system calls for programs to request OS services.

  9. 9

    In the C language, which system call is used to read data from a file?

    1. A

      write()

    2. B

      read()

    3. C

      copy()

    4. D

      open()

    Correct answer
    B

    read()

    Explanation

    The lecture shows the read() system call example: 'read(int fd, void *buf, size_t count)'.

  10. 10

    Which parameter in the read() system call specifies the maximum number of bytes to read?

    1. A

      fd

    2. B

      buf

    3. C

      size

    4. D

      count

    Correct answer
    D

    count

    Explanation

    The lecture says 'size_t count' is the maximum number of bytes to be read into the buffer.

  11. 11

    What is the difference between a system program like DIR and a user program like Python when run from the command line?

    1. A

      DIR automatically exits after execution, while Python waits for commands until told to exit.

    2. B

      DIR requires a graphical interface, while Python works on CLI.

    3. C

      Python runs in batch mode, while DIR runs interactively.

    4. D

      Python is built into the OS, while DIR is an external program.

    Correct answer
    A

    DIR automatically exits after execution, while Python waits for commands until told to exit.

    Explanation

    The lecture explains that DIR runs and exits automatically, but Python requires an explicit exit command to return to the shell.

  12. 12

    What distinguishes single-tasking from multitasking?

    1. A

      Single-tasking is used in mobile devices; multitasking is used in desktops.

    2. B

      Single-tasking runs one process at a time; multitasking runs multiple processes concurrently.

    3. C

      Single-tasking supports multiple users; multitasking supports only one user.

    4. D

      Single-tasking uses a GUI; multitasking uses a CLI.

    Correct answer
    B

    Single-tasking runs one process at a time; multitasking runs multiple processes concurrently.

    Explanation

    The lecture describes MS-DOS as single-tasking (one program at a time) and Windows as multitasking (many things running).

  13. 13

    In MS-DOS, what happens when you run a program like Python from the command interpreter?

    1. A

      The program runs alongside the command interpreter in separate memory spaces.

    2. B

      The command interpreter exits and Python becomes the new shell.

    3. C

      The program runs in batch mode without user interaction.

    4. D

      The program is loaded into memory and runs; when it exits, control returns to the command interpreter.

    Correct answer
    D

    The program is loaded into memory and runs; when it exits, control returns to the command interpreter.

    Explanation

    The lecture shows the MS-DOS memory map: kernel, command interpreter, then process loaded; upon exit, back to command interpreter.

  14. 14

    In a multitasking Unix system, how are processes laid out in memory?

    1. A

      Only one process exists in memory at a time, but it switches rapidly.

    2. B

      Multiple processes are scattered throughout memory, all running concurrently.

    3. C

      Processes are stored on disk and swapped in one at a time.

    4. D

      All processes are loaded contiguously below the kernel.

    Correct answer
    B

    Multiple processes are scattered throughout memory, all running concurrently.

    Explanation

    The lecture's Unix memory map shows kernel at bottom, then multiple processes scattered, all running via multitasking.

  15. 15

    What is a kernel in an operating system?

    1. A

      The smallest, most protected part of the OS that controls everything.

    2. B

      A graphical user interface that manages windows and icons.

    3. C

      A command-line interpreter that processes user commands.

    4. D

      A file system that organizes data on storage devices.

    Correct answer
    A

    The smallest, most protected part of the OS that controls everything.

    Explanation

    The lecture defines the kernel as 'the smallest, most protected part of the operating system' and 'a spider at the center of the web'.

  16. 16

    What is the key characteristic of a microkernel?

    1. A

      It uses a layered structure with hardware at the bottom.

    2. B

      It includes all OS services in a single large kernel.

    3. C

      It loads device drivers only when needed.

    4. D

      It keeps the kernel as small as possible, with other services running as separate modules.

    Correct answer
    D

    It keeps the kernel as small as possible, with other services running as separate modules.

    Explanation

    The lecture says a microkernel puts 'as little as possible in that central bit and hives everything off'.

  17. 17

    What is a potential drawback of using a microkernel?

    1. A

      Communication overhead between layers can slow down the system.

    2. B

      It requires more memory to store the kernel.

    3. C

      It cannot support multiple users.

    4. D

      It is less secure than a monolithic kernel.

    Correct answer
    A

    Communication overhead between layers can slow down the system.

    Explanation

    The lecture notes that communication between layers in a microkernel is not free and can cause overhead, potentially slowing the system.

  18. 18

    What does a layered operating system structure achieve?

    1. A

      It allows all programs to run with full hardware privileges.

    2. B

      It provides protection by preventing direct access to hardware through layers.

    3. C

      It simplifies the boot process by loading all layers at once.

    4. D

      It eliminates the need for system calls.

    Correct answer
    B

    It provides protection by preventing direct access to hardware through layers.

    Explanation

    The lecture's layered diagram shows hardware at bottom, then layers for IO, memory, file system, etc., each adding protection.

  19. 19

    What is a loadable kernel module used for?

    1. A

      Providing a graphical interface for kernel configuration.

    2. B

      Replacing the entire operating system with a new version.

    3. C

      Adding extra functionality to the kernel dynamically without recompilation.

    4. D

      Managing user accounts and passwords.

    Correct answer
    C

    Adding extra functionality to the kernel dynamically without recompilation.

    Explanation

    The lecture mentions loadable modules allow adding extra functionality, like the Mac graphical interface, dynamically.

  20. 20

    Which of the following operating systems uses a hybrid structure combining monolithic and microkernel features?

    1. A

      Android

    2. B

      Windows

    3. C

      MS-DOS

    4. D

      Linux

    Correct answer
    B

    Windows

    Explanation

    The lecture states Windows and Mac use a hybrid approach, with large kernel chunks but flexibility to add modules.

  21. 21

    What is the first step when a computer boots up?

    1. A

      Transferring control to the command interpreter.

    2. B

      Checking the hardware for presence of screen and keyboard.

    3. C

      Running the user's startup programs.

    4. D

      Loading the operating system from disk into memory.

    Correct answer
    B

    Checking the hardware for presence of screen and keyboard.

    Explanation

    The lecture says: 'You start the computer, it checks the hardware. Have I got a screen? Have I got a keyboard? Runs some initial boot code.'

  22. 22

    What happens if the operating system cannot be found during boot?

    1. A

      The boot process continues using a backup kernel.

    2. B

      The computer automatically installs a new OS.

    3. C

      The screen remains blank indefinitely.

    4. D

      An error message appears: 'Can't find operating system on the hard disk.'

    Correct answer
    D

    An error message appears: 'Can't find operating system on the hard disk.'

    Explanation

    The lecture mentions that if the OS is corrupted, you get an error saying 'can't find operating system on the hard disk'.

  23. 23

    What is the Android OS kernel based on?

    1. A

      MS-DOS kernel.

    2. B

      Linux, which is based on Unix.

    3. C

      Windows NT kernel.

    4. D

      A completely custom kernel.

    Correct answer
    B

    Linux, which is based on Unix.

    Explanation

    The lecture states Android is 'based on Unix' because it's based on Linux, which is based on Unix.

  24. 24

    Why does Android include power management as a key feature?

    1. A

      Because Android requires constant network connectivity.

    2. B

      Because power management speeds up the CPU.

    3. C

      Because power management reduces memory usage.

    4. D

      Because it is designed for mobile devices with limited battery life.

    Correct answer
    D

    Because it is designed for mobile devices with limited battery life.

    Explanation

    The lecture notes that power management is important for small portable devices to ensure the battery lasts.

  25. 25

    What is the role of the Dalvik virtual machine in Android?

    1. A

      It handles file system operations.

    2. B

      It manages the phone's power consumption.

    3. C

      It allows Java programs to run as executables on the Android platform.

    4. D

      It provides a graphical user interface for apps.

    Correct answer
    C

    It allows Java programs to run as executables on the Android platform.

    Explanation

    The lecture describes Dalvik as a virtual machine that runs Java programs as executables.

  26. 26

    When Android applications continue to work after an OS upgrade, what is the primary reason?

    1. A

      Apps are stored in read-only memory.

    2. B

      The kernel is not updated during upgrades.

    3. C

      The Dalvik virtual machine remains compatible across versions.

    4. D

      The user interface remains unchanged.

    Correct answer
    C

    The Dalvik virtual machine remains compatible across versions.

    Explanation

    The lecture says apps keep running because they still run on the same virtual machine inside the core Android system.

Question 1 of 26
Question 1 of 26

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent