Made with ScholarlyMake flashcards like these from your own notes
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.
Question:What are the goals of an Operating System?
Answer:1. Efficient use 2. User convenience 3. Non interference
Question:What is the structure of a computer system?
Answer:1. Hardware 2. Operating System 3. Application Programs 4. Users
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.
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.
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.
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.
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.
Question:What does concurrent execution in a computer system refer to?
Answer:The concurrent execution of CPUs and devices competing for memory.
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.
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.
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.
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.
Question:What happens when an interrupt occurs?
Answer:When an interrupt occurs, the CPU stops executing the current task.
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.
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.
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.
Question:What is the implementation challenge of the ISR?
Answer:Implementing ISR as a routine is slow and therefore inefficient.
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.
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.
Question:Where is the interrupt vector usually stored?
Answer:The interrupt vector is usually stored in low memory.
Question:How do Windows and Linux handle interrupts?
Answer:Windows and Linux dispatch interrupts using the interrupt vector approach.
Question:What type of memory can the CPU access?
Answer:The CPU can access only main memory, which is RAM (Random Access Memory).
Question:What is the characteristic of main memory?
Answer:Main memory is volatile, meaning it loses data with the loss of power.
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.
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.
Question:What is the memory layout for a multiprogrammed system?
Answer:Low Memory and High Memory.
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.
Question:What is the desired response time for interactive computing?
Answer:The response time should be 1 second.
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.
Question:What occurs if several jobs are ready to run at the same time?
Answer:CPU scheduling is applied.
Question:What is dual mode operation in operating systems?
Answer:Dual mode operation allows the operating system to protect itself and other system components.
Question:What are the two modes in dual mode operation?
Answer:User mode and kernel mode.
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.
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.
Question:Where can privileged instructions be executed?
Answer:Privileged instructions can only be executed in kernel mode.
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.
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.
Question:How does the timer help in operating systems?
Answer:The timer helps to prevent infinite loops and processes from hogging resources.
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.
Question:What occurs when the timer's counter reaches zero?
Answer:An interrupt is generated when the counter reaches zero.
Question:What is the basic unit of computer storage?
Answer:A bit, which can be either 0 or 1.
Question:How many bits are in a byte?
Answer:A byte is made up of 8 bits.
Question:What is the smallest convenient chunk of storage on most computers?
Answer:A byte.
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.
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.
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.
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.
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).
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.
Question:What is a Miss in the context of cache?
Answer:A Miss occurs when the information is not found in the cache.
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.
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.
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.
Question:What does the bootstrap program do?
Answer:It loads the kernel and system programs, also known as system daemons.
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.
Question:What event does the system wait for after it is fully booted?
Answer:The system waits for an event to occur.
Question:What is multiprogramming in operating systems?
Answer:Multiprogramming organizes jobs, code, and data so the CPU always has one to execute.
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.
Question:What happens to a job in multiprogramming when it has to wait for IO?
Answer:The operating system switches to another job.
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.
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.
Question:When does a program become a process?
Answer:A program becomes a process when the executable file is loaded into memory.
Question:How are processes represented in Linux?
Answer:Processes in Linux are referred to as tasks and are represented by the C structure 'taskstruct'.
Question:What is the 'pid' in the context of 'taskstruct'?
Answer:'pid' stands for process identifier.
Question:What does the 'state' attribute in 'taskstruct' represent?
Answer:The 'state' attribute represents the state of the process.
Question:What type is 'timeslice' in 'taskstruct'?
Answer:'timeslice' is of type 'unsigned int' and contains scheduling information.
Question:What does the 'parent' attribute in 'taskstruct' represent?
Answer:The 'parent' attribute represents this process's parent.
Question:What does the 'children' attribute in 'taskstruct' represent?
Answer:The 'children' attribute represents this process's children.
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.
Question:What does VMM stand for and what does it do?
Answer:VMM stands for Virtual Machine Manager, and it provides virtualization services.
Question:To which class of software does virtualization belong?
Answer:Virtualization belongs to the Emulation class of software.
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.
Question:What is a disadvantage of emulation?
Answer:The disadvantage of emulation is that it is a lot slower.
Question:What are the components of virtualization as represented in the text?
Answer:The components include hardware, kernel, processes, and the virtual machine manager.