Logo/

Chapter 1 - Introduction

Log in

Made with ScholarlyMake flashcards like these from your own notes

Chapter 1 - Introduction

Questions and answers

75 cards
  1. Question:What is an Operating System?

    Answer:Program that manages a computer's hardware, provides a basis for application programs, and acts as an intermediary between a user of a computer and the computer hardware.

  2. Question:What are the goals of an Operating System?

    Answer:1. Efficient use 2. User convenience 3. Non interference

  3. Question:What is the structure of a computer system?

    Answer:1. Hardware 2. Operating System 3. Application Programs 4. Users

  4. Question:What is the role of an Operating System as a resource allocator?

    Answer:Manages all resources such as memory, CPU time, and I/O devices. It decides between conflicting requests for efficient and fair resource use.

  5. Question:What is the role of an Operating System as a control program?

    Answer:Controls the execution of programs to prevent errors and improper use of the computer.

  6. Question:What is the primary component of an Operating System?

    Answer:Kernel, which stays in main memory and is the one program that is always running on the computer. The Kernel controls the execution of all other programs.

  7. Question:How do programs interact with the Kernel in an Operating System?

    Answer:Other programs (system or user) interact with the Kernel through system calls, which are routines mostly written in a high-level language (C or C++). However, lower-level tasks are written in assembly.

  8. Question:What is the role of CPUs and device controllers in a computer system organization?

    Answer:One or more CPUs and device controllers connect through a common bus, providing access to shared memory.

  9. Question:What does concurrent execution in a computer system refer to?

    Answer:The concurrent execution of CPUs and devices competing for memory.

  10. Question:What is an interrupt in the context of an operating system?

    Answer:An interrupt is a mechanism that enables a device/software to notify the CPU that it needs attention.

  11. Question:Why is an operating system described as event driven?

    Answer:An operating system is described as event driven because events occur by interrupts, making the OS interrupt driven.

  12. Question:What can cause an interrupt?

    Answer:An interrupt can be caused by a signal to the CPU from a device attached to a computer via system bus hardware or from an executing program within the computer through system calls.

  13. Question:What is a trap or exception?

    Answer:A trap or exception is a software-generated interrupt caused either by an error or a user request.

  14. Question:What happens when an interrupt occurs?

    Answer:When an interrupt occurs, the CPU stops executing the current task.

  15. Question:How does the operating system preserve the state of the CPU during an interrupt?

    Answer:The operating system preserves the state of the CPU by storing registers and the program counter.

  16. Question:What is the purpose of the Interrupt Service Routine (ISR)?

    Answer:The ISR handles the interrupt after which the interrupted process resumes its execution.

  17. Question:What determines what action should be taken for each type of interrupt?

    Answer:Separate segments of code determine what action should be taken for each type of interrupt.

  18. Question:What is the implementation challenge of the ISR?

    Answer:Implementing ISR as a routine is slow and therefore inefficient.

  19. Question:How are interrupts managed efficiently in an operating system?

    Answer:Only predefined interrupts exist, and a table of pointers to the various interrupt routines is used instead.

  20. Question:What is an interrupt vector?

    Answer:An interrupt vector is a table/array of addresses that is called to manage the various interrupt routines.

  21. Question:Where is the interrupt vector usually stored?

    Answer:The interrupt vector is usually stored in low memory.

  22. Question:How do Windows and Linux handle interrupts?

    Answer:Windows and Linux dispatch interrupts using the interrupt vector approach.

  23. Question:What type of memory can the CPU access?

    Answer:The CPU can access only main memory, which is RAM (Random Access Memory).

  24. Question:What is the characteristic of main memory?

    Answer:Main memory is volatile, meaning it loses data with the loss of power.

  25. Question:What is needed for permanent and large quantity data storage?

    Answer:Secondary storage such as hard disk drives, CDs, magnetic tapes, etc., is needed to store data permanently and in large quantities.

  26. Question:What do all forms of memory provide?

    Answer:All forms of memory provide an array of bytes, and each byte has its own address.

  27. Question:What is the memory layout for a multiprogrammed system?

    Answer:Low Memory and High Memory.

  28. Question:What is timesharing multitasking?

    Answer:Timesharing multitasking is a logical extension of multiprogramming where the CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing.

  29. Question:What is the desired response time for interactive computing?

    Answer:The response time should be 1 second.

  30. Question:What does each user have in memory during timesharing multitasking?

    Answer:Each user has at least one program executing in memory, called a process.

  31. Question:What occurs if several jobs are ready to run at the same time?

    Answer:CPU scheduling is applied.

  32. Question:What is dual mode operation in operating systems?

    Answer:Dual mode operation allows the operating system to protect itself and other system components.

  33. Question:What are the two modes in dual mode operation?

    Answer:User mode and kernel mode.

  34. Question:What is the purpose of the mode bit in the CPU?

    Answer:The mode bit is a CPU status bit used to indicate the current mode, providing the ability to distinguish when the CPU is running in user code or kernel code.

  35. Question:What indicates kernel mode and user mode in the mode bit?

    Answer:Kernel mode is indicated by bit 0 and user mode by bit 1.

  36. Question:Where can privileged instructions be executed?

    Answer:Privileged instructions can only be executed in kernel mode.

  37. Question:What happens during a system call in terms of mode?

    Answer:A system call changes the mode to kernel, and returning from the call resets it to user mode.

  38. Question:What is the function of the timer in an operating system?

    Answer:The timer is a hardware component that can be set to interrupt the computer after a specified period.

  39. Question:How does the timer help in operating systems?

    Answer:The timer helps to prevent infinite loops and processes from hogging resources.

  40. Question:How does the operating system set the time period for the timer?

    Answer:The operating system maintains a counter and sets its value using a privileged instruction which is decremented by the physical clock.

  41. Question:What occurs when the timer's counter reaches zero?

    Answer:An interrupt is generated when the counter reaches zero.

  42. Question:What is the basic unit of computer storage?

    Answer:A bit, which can be either 0 or 1.

  43. Question:How many bits are in a byte?

    Answer:A byte is made up of 8 bits.

  44. Question:What is the smallest convenient chunk of storage on most computers?

    Answer:A byte.

  45. Question:Why do most computers not have an instruction to move a bit?

    Answer:Most computers do have an instruction to move a byte instead.

  46. Question:What is a word in computer architecture?

    Answer:A word is the native unit of data in a computer architecture, made up of one or more bytes.

  47. Question:What is the typical size of a word in a computer with 64-bit registers and memory addressing?

    Answer:64 bits, or 8 bytes.

  48. Question:How does a computer execute operations in terms of word size?

    Answer:A computer executes many operations in its native word size rather than byte by byte.

  49. Question:What is Cache in computer systems?

    Answer:Cache is a faster storage system than main memory, located very close to the CPU or within the CPU itself (e.g., instruction cache).

  50. Question:What happens when CPU needs a piece of information from cache?

    Answer:The CPU first checks the cache; if it finds it, it is called a Hit.

  51. Question:What is a Miss in the context of cache?

    Answer:A Miss occurs when the information is not found in the cache.

  52. Question:What does the CPU do if it experiences a Miss?

    Answer:The CPU gets the information from main memory and places a copy of it in the cache.

  53. Question:How does cache size and replacement policy affect system performance?

    Answer:Careful selection of cache size and replacement policy greatly increases the system's performance.

  54. Question:What is the bootstrap program?

    Answer:The bootstrap program is automatically loaded when a computer system is switched on or rebooted, stored in a reserved part of an IO device, typically a disk ROM or EEPROM.

  55. Question:What does the bootstrap program do?

    Answer:It loads the kernel and system programs, also known as system daemons.

  56. Question:What do kernel and system programs do once the system is fully booted?

    Answer:They run all the time on the computer to provide services.

  57. Question:What event does the system wait for after it is fully booted?

    Answer:The system waits for an event to occur.

  58. Question:What is multiprogramming in operating systems?

    Answer:Multiprogramming organizes jobs, code, and data so the CPU always has one to execute.

  59. Question:How does an operating system manage jobs in multiprogramming?

    Answer:A subset of total jobs in the system is kept in memory, and one job is selected and run via job scheduling.

  60. Question:What happens to a job in multiprogramming when it has to wait for IO?

    Answer:The operating system switches to another job.

  61. Question:What are the key functionalities of an operating system as a resource manager?

    Answer:Process Management, Memory Management, Storage and File Management, Protection and Security.

  62. Question:What is a process in operating systems?

    Answer:A process is a program in execution. A program is a passive entity stored on disk as an executable file, whereas a process is an active entity.

  63. Question:When does a program become a process?

    Answer:A program becomes a process when the executable file is loaded into memory.

  64. Question:How are processes represented in Linux?

    Answer:Processes in Linux are referred to as tasks and are represented by the C structure 'taskstruct'.

  65. Question:What is the 'pid' in the context of 'taskstruct'?

    Answer:'pid' stands for process identifier.

  66. Question:What does the 'state' attribute in 'taskstruct' represent?

    Answer:The 'state' attribute represents the state of the process.

  67. Question:What type is 'timeslice' in 'taskstruct'?

    Answer:'timeslice' is of type 'unsigned int' and contains scheduling information.

  68. Question:What does the 'parent' attribute in 'taskstruct' represent?

    Answer:The 'parent' attribute represents this process's parent.

  69. Question:What does the 'children' attribute in 'taskstruct' represent?

    Answer:The 'children' attribute represents this process's children.

  70. Question:What is virtualization in computing environments?

    Answer:Virtualization is a technology that creates an abstraction of the computer hardware, creating an illusion that all its operating systems are running on their own private computer.

  71. Question:What does VMM stand for and what does it do?

    Answer:VMM stands for Virtual Machine Manager, and it provides virtualization services.

  72. Question:To which class of software does virtualization belong?

    Answer:Virtualization belongs to the Emulation class of software.

  73. Question:What is emulation in the context of computing?

    Answer:Emulation is a methodology used when compiled programs' source CPU type is different from the target CPU type.

  74. Question:What is a disadvantage of emulation?

    Answer:The disadvantage of emulation is that it is a lot slower.

  75. Question:What are the components of virtualization as represented in the text?

    Answer:The components include hardware, kernel, processes, and the virtual machine manager.