Podcast
Questions and Answers
Which of the following is NOT a goal of an Operating System?
Which of the following is NOT a goal of an Operating System?
- Execute user programs and make solving user problems easier.
- Use computer hardware in an efficient manner.
- Directly manage applications without user intervention. (correct)
- Make the computer system convenient to use.
The Kernel is a program that is only loaded when needed, and not kept running constantly.
The Kernel is a program that is only loaded when needed, and not kept running constantly.
False (B)
What is the role of the 'shell' in an operating system?
What is the role of the 'shell' in an operating system?
command interpreter
In the context of operating systems, a ______ is a program in execution.
In the context of operating systems, a ______ is a program in execution.
Match the memory type with its characteristic:
Match the memory type with its characteristic:
Which activity is NOT a responsibility of the operating system concerning file management?
Which activity is NOT a responsibility of the operating system concerning file management?
In a distributed system, processors share memory and a clock.
In a distributed system, processors share memory and a clock.
What is the term for the ability of a system to continue providing service proportional to the level of surviving hardware?
What is the term for the ability of a system to continue providing service proportional to the level of surviving hardware?
A system designed for ______ can be described as fault-tolerant.
A system designed for ______ can be described as fault-tolerant.
Match the protection mechanism with its function:
Match the protection mechanism with its function:
Which of the following operating systems is designed to maximize user convenience and responsiveness rather than being multi-user or multitasking?
Which of the following operating systems is designed to maximize user convenience and responsiveness rather than being multi-user or multitasking?
A hard real-time system guarantees that critical tasks will be completed within specified time constraints.
A hard real-time system guarantees that critical tasks will be completed within specified time constraints.
What is the purpose of a 'bootstrap program' in a computer system?
What is the purpose of a 'bootstrap program' in a computer system?
An interrupt transfers control to the ______ generally, through the interrupt vector.
An interrupt transfers control to the ______ generally, through the interrupt vector.
Match the I/O structure with its description:
Match the I/O structure with its description:
What is the key function of a device controller?
What is the key function of a device controller?
Direct Memory Access (DMA) involves the CPU actively transferring data to and from main memory.
Direct Memory Access (DMA) involves the CPU actively transferring data to and from main memory.
What is 'caching' in the context of storage hierarchy?
What is 'caching' in the context of storage hierarchy?
In dual-mode operation, execution done on behalf of a user is referred to as ______ mode.
In dual-mode operation, execution done on behalf of a user is referred to as ______ mode.
Match the CPU protection component with its function:
Match the CPU protection component with its function:
Which of the following is NOT typically included in a Process Control Block (PCB)?
Which of the following is NOT typically included in a Process Control Block (PCB)?
A process is considered 'running' if it is waiting for an I/O operation to complete.
A process is considered 'running' if it is waiting for an I/O operation to complete.
What does the program counter indicate?
What does the program counter indicate?
The queue that consists of all processes in the system is known as the ______ queue.
The queue that consists of all processes in the system is known as the ______ queue.
Match the Process Scheduling Queue with its description:
Match the Process Scheduling Queue with its description:
Which scheduler controls the degree of multiprogramming?
Which scheduler controls the degree of multiprogramming?
Context switching is considered overhead because the system does productive work while switching.
Context switching is considered overhead because the system does productive work while switching.
Which system call is used to replace the process' memory space with a new program?
Which system call is used to replace the process' memory space with a new program?
A process is considered ______ if it cannot affect or be affected by other processes in the system.
A process is considered ______ if it cannot affect or be affected by other processes in the system.
Match the process cooperation advantage with its description:
Match the process cooperation advantage with its description:
What is the goal of CPU scheduling?
What is the goal of CPU scheduling?
In preemptive scheduling, a process, once allocated to the CPU, will always run until completion.
In preemptive scheduling, a process, once allocated to the CPU, will always run until completion.
What is the convoy effect, and which scheduling algorithm can cause it?
What is the convoy effect, and which scheduling algorithm can cause it?
The shortest-job-first (SJF) scheduling algorithm is provably optimal, but it's hard to implement because it requires knowing the length of the ______.
The shortest-job-first (SJF) scheduling algorithm is provably optimal, but it's hard to implement because it requires knowing the length of the ______.
Match the scheduling algorithm with its main disadvantage:
Match the scheduling algorithm with its main disadvantage:
What is the technique of 'aging' used for in priority scheduling?
What is the technique of 'aging' used for in priority scheduling?
In the Round Robin (RR) scheduling algorithm, a larger time quantum will always improve CPU efficiency.
In the Round Robin (RR) scheduling algorithm, a larger time quantum will always improve CPU efficiency.
Define preemtive scheduling.
Define preemtive scheduling.
The many-to-one model maps many user-level threads to ______ kernel thread.
The many-to-one model maps many user-level threads to ______ kernel thread.
Match the thread model with it's shortcoming:
Match the thread model with it's shortcoming:
Flashcards
Operating System
Operating System
A program that acts as an intermediary between a user of a computer and the computer hardware.
Operating System role
Operating System role
Controls and coordinates the use of hardware among application programs.
Operating System's job
Operating System's job
Manages and allocates resources, controls program execution and I/O.
Kernel
Kernel
Signup and view all the flashcards
Shell
Shell
Signup and view all the flashcards
Process
Process
Signup and view all the flashcards
Process Management
Process Management
Signup and view all the flashcards
Main-Memory
Main-Memory
Signup and view all the flashcards
Main-Memory Management
Main-Memory Management
Signup and view all the flashcards
File
File
Signup and view all the flashcards
File Management
File Management
Signup and view all the flashcards
I/O System
I/O System
Signup and view all the flashcards
Secondary Storage management
Secondary Storage management
Signup and view all the flashcards
Disk Management activities
Disk Management activities
Signup and view all the flashcards
Distributed System
Distributed System
Signup and view all the flashcards
Protection System
Protection System
Signup and view all the flashcards
Command Interpreter
Command Interpreter
Signup and view all the flashcards
Mainframe Systems
Mainframe Systems
Signup and view all the flashcards
Batch Processing
Batch Processing
Signup and view all the flashcards
Multiprogramming
Multiprogramming
Signup and view all the flashcards
Time-Sharing multitasking Operating Systems
Time-Sharing multitasking Operating Systems
Signup and view all the flashcards
Multiprocessor Operating systems or parallel OS
Multiprocessor Operating systems or parallel OS
Signup and view all the flashcards
Symmetric Multiprocessing System
Symmetric Multiprocessing System
Signup and view all the flashcards
Distributed Operating System
Distributed Operating System
Signup and view all the flashcards
Personal Computer Systems
Personal Computer Systems
Signup and view all the flashcards
Real-Time Operating Systems
Real-Time Operating Systems
Signup and view all the flashcards
Program Execution
Program Execution
Signup and view all the flashcards
I/O Operations
I/O Operations
Signup and view all the flashcards
File System Manipulation
File System Manipulation
Signup and view all the flashcards
Communications
Communications
Signup and view all the flashcards
Resource allocation
Resource allocation
Signup and view all the flashcards
Accounting
Accounting
Signup and view all the flashcards
What is system Call?
What is system Call?
Signup and view all the flashcards
Virtual machines
Virtual machines
Signup and view all the flashcards
SYSGEN
SYSGEN
Signup and view all the flashcards
Interrupt Handling
Interrupt Handling
Signup and view all the flashcards
Computer-System Operation
Computer-System Operation
Signup and view all the flashcards
Direct Memory Access Structure
Direct Memory Access Structure
Signup and view all the flashcards
Study Notes
Operating System Basics
- The operating system (OS) acts as an intermediary between a user and the computer hardware.
- An OS is a collection of programs that manage a computer's operations.
- Examples of operating systems include UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, OS/2, MacOS,VMS, and MVS
Operating System Goals
- Execute user programs to solve user problems easily.
- Make the computer system convenient and efficient to use.
- Use computer hardware efficiently.
Computer System Components
- Hardware provides the basic computing resources, such as the CPU, memory, and I/O devices.
- The operating system controls and coordinates the use of hardware among application programs and users.
- Application programs use system resources to solve users' computing problems, including compilers, database systems, video games, and business programs.
- Users can be people, machines, or other computers.
Operating System Definitions
- The OS manages and allocates resources.
- It controls the execution of user programs and I/O device operations.
- The kernel is the primary program running at all times, with other programs considered applications.
Components of OS
- The OS comprises the Kernel and Shell.
- The kernel is a constant, active part of the OS that interacts directly with the hardware, (e.g., device drivers, DLL files, system files).
- The shell functions as a command interpreter, enabling user interaction with application programs and executing OS instructions, namely commands.
User Perspective
- The OS is designed for user convenience, maximizing user work and ease of use.
System Perspective
- From a computer standpoint, an OS is a control program managing user program execution to prevent errors and ensure proper computer use
- It focuses on the operation and control of I/O devices
Operating System Functions
- Manages and allocates resources to processes, including CPU time, memory, files, and I/O devices
- Activities include process creation, deletion, suspension, and resumption and also provides mechanisms for process synchronization and communication
Main-Memory Management
- Memory is a quickly accessible data repository shared by the CPU and I/O devices
- The OS tracks memory usage, decides which process to load when space is available, and allocates/deallocates memory.
- Main memory is a volatile storage device and loses contents upon system failure
File Management
- A file is a collection of related data, representing programs or data.
- Activities include file/directory creation and deletion and also provides primitives for file/directory manipulation
- It also maps files onto secondary storage and performs file backups
I/O System Management
- The I/O system includes a buffer-caching system, a general device-driver interface, and drivers for specific hardware.
Secondary-Storage Management
- Due to main memory limitations, secondary storage is needed and disks are the primary online storage
- The OS manages free space, allocates storage, and schedules disk usage
Networking
- A distributed system is a networked collection of processors with their own local memory
- Processors communicate via a protocol over a communication network
- Distributed systems enable user access to system resource and allow computation speed-up
Data Management
- A protection system controls access to system and user resources, distinguishing between authorized and unauthorized use.
- It specifies controls and provides enforcement.
Command-Interpreter System
- The system interprets control statements to manage processes, I/O, storage, memory, file access, protection, and networking.
- The read-and-interpret program is called a command-line interpreter or shell; it gets and executes command statements.
Operating-System Structures
- OS structure includes system components, services, calls, programs, structure, virtual machines, design/implementation, and generation.
Common System Components
- The components are process management, main memory management, file management, I/O system management, secondary management, networking, protection system, and command-interpreter system.
Evolution of Operating Systems
- Mainframe systems reduce setup time with job batching and automatic job sequencing using a resident monitor.
Batch Processing
- OS groups jobs with similar requirements for efficient processing, managed by a computer operator
- It schedules jobs by priority and resource needs.
Multiprogramming
- This OS executes multiple jobs simultaneously on a single processor, increasing CPU utilization
- Jobs are stored in a job pool in the disc, loaded into main memory, and switched during I/O waits
- It uses job scheduling and CPU scheduling
Time-Sharing/Multitasking
- A logical extension of multiprogramming that enables faster job switching and simultaneous user access
- Users interact with running jobs with the use of virtual memory
- Includes CPU scheduling, memory management, disc management, and security management
- Examples: CTSS, MULTICS, CAL, and UNIX
Multiprocessor Systems
- In these parallel or tightly coupled OS, processors share the computer bus, clock, and sometimes memory and peripherals
- Provide increased throughput, economy of scale, and reliability where throughput increases as processors are simply added
- If one processor fails, others take over, offering graceful degradation or fault tolerance
Multiprocessor classifications
- Symmetric multiprocessing: each processor runs an identical copy of the OS, communicating as needed.
- Asymmetric multiprocessing: features a master processor controlling slave processors, scheduling jobs, and managing memory.
Distributed Operating Systems
- In a distributed system, machines are networked, each with its own processor and local memory.
- The OS across machines collaborates to manage network resources
- Can be classified into Client-Server or Peer-to-Peer systems.
Advantages of distributed systems
- Resource sharing
- Computation speed up via load sharing
- Reliability
- Communications
- Requires networking infrastructure, such as LAN or WAN
Personal Computer Systems
- The OS is designed for maximizing user convenience and responsiveness, without multi-user or multi-tasking capabilities.
- Including systems like Microsoft Windows, and Apple Macintosh.
Real-Time Operating Systems (RTOS)
- These OS are meant for applications with fixed deadlines and used in embedded systems, automobile engine controllers, industrial robots, spacecraft, and industrial control systems.
- Classified into hard real-time systems (guarantee task completion on time) and soft real-time systems (prioritize real-time tasks).
Operating System Services
- Providing user convenience
- Program execution: enabling the user to run programs by allocating/deallocating memory and scheduling the CPU
- I/O Operations: making it more convenient for user to run programs
- File system manipulation
- Communications
- Error Detection
System Services for Efficient Operation
- Resource allocation: managing and allocating resources when multiple users/jobs are running
- Accounting
- Protection
System Calls
- System calls provide an interface that allow user-level processes to request services from the operating system
- System Calls perform services such as process control, file management, device management, information maintenance, and communications.
Operating System Structures
- An Operating system layer introduces new operations and existing operations
Microkernel System Structure:
- Transports as much from the kernel into the "user" space.
- Communication between user modules takes place using message passing
Advantages of Microkernel System Structure
- Easier to extend a microkernel system structure
- Easier to port the operating system to new architectures
- More reliable with more reliability because less code is running in kernel mode
- More secure
Virtual Machines
- A virtual machine uses a layered approach.
- A virtual machine treats hardware and the operating system kernel as the underlying hardware.
- Provide an interface identical to bare hardware, and Creates the illusion of multiple processes on their own processors with memory
Advantages of Virtual Machines
- Complete protection of system resources because each virtual machine is isolated from all others
- Ideal for OS research and development, since system development is done on the virtual machine without disrupting normal system operation.
- Requires effort to provide an underlying machine exact duplicate
System Generation (SYSGEN)
- The system must be configured for each specific computer site which is know as system generation (SYSGEN).
- SYSGEN program obtains information concerning the specific configuration of the hardware system.
- Kinds of information: such as what CPU will be used?, What devices are available? What operating-system options are desired?
Booting
- Starting a computer by loading the kernel
- Includes a bootstrap program in ROM to locate and load the kernel into memory.
Computer-System Architecture
- Includes CPU, disk controller and printer.
Computer-System Operation
- A description of concurrent operations of the I/O device and the CPU.
Functions of Interrupts
- An interrupt transfers control to the interrupt service routine through the interrupt vector.
- Interrupts save the address of interrupted instruction and disable the incoming interrupts.
Interrupt Handling
- Involves the operating system preserving the state of the CPU by storing registers and the program counter
- Determines the type of interrupt and also uses separate segments of code determine action for type of interrupt
I/O structure
- Describe what happens to the I/O after its starts. Including information on system calls.
- In simple systems, after I/O starts, control returns to user only upon completion.
- Include a device-status table with an entry for each I/O device.
Two I/O Methods
- Synchronous (after I/O starts, control returns to user program only upon I/O completion.)
- Asynchronous (after I/O starts, control returns to user program without waiting for I/O completion.)
Direct Memory Access (DMA)
- Structures that allow high-speed I/O at memory speeds
- A Device controller which has a local buffer transfer blocks of data directly to main memory without CPU intervention
Storage Structure
- Main memory is the only storage that the CPU can access directly
- Secondary storage is an extension of main memory by providing large of nonvolatile storage capacity
Magnetic disk
- Involves rigid metal and class platters covered in recording metallic material
- Logically divided into sectors and tracks through the use of disk conttoller
Storage Hierarchy
- Is organized in a hierarchy by speed, cost and volatility.
- Caching - copying information into faster storage system; main memory can be viewed as a last cache for secondary storage
Hardware Protection
- Uses dual mode and must protect I/O, memory and the CPU
Dual Mode Operation
- Enables the Operating System to ensure that an incorrect program cannot cause other programs to execute incorrectly by use of operations known as user mode and monitor mode.
- User mode is execution done on behalf of a use
- Monitor mode (also kernel mode or system mode) – execution done on behalf of operating system
I/O Protection
- Requires all I/O instructions to be privileged instructions so that a user program could never gain control of the computer in monitor mode
Memory Protection
- Requires memory protection at least for interrupt vector and interruption service routines
- Add two registers that determine the range of legal addresses a program can access (base register and limit register)
CPU Protection
- Implementation of a timer that interrupts computer after specified period to ensure operating system maintains control
Process Concept
- A process is an active program, including code, program counter, registers, stack, and data section.
- Operating systems execute jobs or tasks.
- A process includes a program counter stack and data section, which executes in sequential manner
Process State
- The phases of a process are new, running, blocked/waiting, ready, and terminated.
- Program is a static object whereas a process is a dynamic object residing main memory
Process Control Block (PCB)
- Each process is associated with information, including process state, program counter, CPU registers, CPU scheduling, memory management, accounting, and I/O status.,
Process Scheduling Queues
- The Job Queue consists of all processes in the system
- The ready queue consists of the processes that are residing in main memory and are waiting to execute by CPU
- Device Queue consists of all the processes that are waiting for a particular I/O device
Schedulers
- Schedulers decide which processes to move between queues, and allocates the CPU
- Long-term scheduler or job scheduler loads processes from disk into memory, executing infrequently
- Short-term scheduler or CPU scheduler selects a process from those ready and allocates CPU
- The Medium-term scheduler schedules the processes as intermediate level of scheduling
Context Switch
- When the CPU switches to another process, the system preserves state of old process and load the state of the new process
Inter-Process Communication (IPC)
- A process mechanism provides services for other processes to communicate on another and to synchronize their actions.
- Messages are transferred with fixed or variable size
Synchronization Hardware
- Hardware features can make programming task easier and improve efficiency, and this includes simple instruction which are available on the systems
Process creation
- Parent processes create children, forming a process tree
- Parent and children share or do not share resources
- Execution: parent and children execute concurrently or parent waits
- Address space: child duplicates or has a new program
Process termination
- Occurs by executing the last statement (exiting)
- The parent may terminate the execution of children (abort)
Cooperating Processes
- May be either independent processes or processes that are cooperating. Each are able to affect both system and data integrity
Mutex
- A method of locking a data structure, such as an object, to only allow access from one thread.
- Protect the variables and is also used when large number of threads come on particular processes
CPU Scheduling
- Includes Basic Concepts of scheduling, including basic concepts, scheduling Criteria, scheduling Algorithms, Multiple-Processor Scheduling and Algorithm Evaluation
Process Scheduling Queues
- Processes is used to among the one selected among main memory that are ready to execute, and allocates the CPU to one of then
- Switches from running to waiting state, running to ready state, waiting to ready and terminating
Dispatcher
- Gives control of the CPU to the process selected by the short-term scheduler involving. switching to user mode & jumping to a proper location in the user program.
Scheduling Criteria
- Cpu Utilization
- A throughput (number of the process that completed execution per time unit
Optimization Structure
- Min response time
- Max CPU Utilization
First come first Served Scheduling
- By for the simplest cpu algorithm is the first come first served. First process requests the cpu first this system is allocated the time
- Shortest job First Scheduling
- Is a different approach to Cpu scheduling is the smallest job first scheduling is to associate with reach process the end of the ladders new cpu Burst.
Priority Scheduling
- The SJF scheduling as an algorithm in a special case of the general priority scheduling algorithm. With each process the allocation of a higher priority
Round Robin scheduling
- The round-robin scheduling algorithm is design especial for the times in history time sharing system.
- It is similar to Fcfs scheduling for preemption id added to switch between process.
Preemptive Scheduling:
- A solution in place the scheduling of the algorithms can be divided into algorithm in the category and to what they can make sure
Non Preemptive scheduling:.
- A scheduling division into a discipline from non process and once process come back to use the cpu comes
Threads
- Threads sometimes called a lightweight process is a basic unit of CPU
- utilization is comprising a thread Id, a program counter, a register set up a stack as it shares with other threads in the same process if code the data section and also system resources
Benefit
- A major categories of programming are broken down into four sections responsiveness for multi threading interactive programming and that can allow a Program to continue or make it increase throughput
User level threads
- User level threads implement in user level libraries rather than system costs of read switching does not need an operating system caused interrupt to the kernel
Kernel threads
- Kernel level thread in that the kernels known as managing all the threads of certain threads which is the canal has a thread table it keeps track all threads
Disadvantages of user level threads
- Disadvantages of user level threads also is that if they all are used without thread table they will have no support and must be provided
Advantages of kernel threads
- Kernels will always have knowledge of who is on this threads which a shadow lay decide which a thread needs to give more time to run
The One to One Model
- Maps each user thread on a kernel thread.
- The only drawback to this model is that creating user thread requires creating a corresponding kernel thread.
The Many-to-Many Model
- Multiplex is many user level threads to smaller or equal number of kernel threads
Process Communication
- A set of process is in deadlock state if it's process waiting for each other
- A deadlock state process has the resource being requested to use those are all
- The term Deadblock the system because the other needs resources by the other and no process is to hold those resources
Preemptable and Nonpreemptable Resources
- In an operating system the resources in preemptable and non preemptable resources comes with resource and resource
Necessary conditions for Deadlock
- (Coffman 1971): identified 4 conditions that must hold simultaneously for there to be a deadlock like mutual exclusion connection and hold up and wait condition
Interprocess communication
- Process must name each other explicitly to send a direct communication or establish a communication is associated
Synchronzation hardware.
- The operating system used synchronization to access their to to what to do after that
Semaphores
- The best possible solution that is known in this document is known to be semaphores and have variable operation called wait
Communication Between Processes
- Takes place by calls to send and receive primitives.
- There are different design options for implementing each primitive.
- Message passing may be either blocking or nonblocking-also known as synchronous and asynchronous.
Blocking send:
- The sending process is blocked until the message is received by the receiving process or by the mailbox.
Nonblocking send:
- The sending process sends the message and resumes operation.
Blocking receive:
- The receiver blocks until a message is available.
Nonblocking receive:
The receiver retrieves either a valid message or a null.
Buffering
- Whether the communication is direct or indirect, messages exchanged by communicating processes reside in a temporary queue.
- Basically, such a queue can be implemented in three ways: Zero capacity, is Bounded capacity, or Bounded capacity
Direct Communication
- Used so that processes are naming each other explicitly - process send messages to process Q and it has links for two each communicating processes
Deadlock Prevention
- Is known to be the process the the that the system must have the system as It takes more steps to create
Detection of aDeadlock
The steps in general on this is a deadlock if it's found in the way
1.Single Instance
We make sure there is only one instance of each type of resource. and follow this with. Removing the nodes of type
Process Termination
A method of aborting all death locked that is the process
Resource preemption
The memory that is being freed from each task as a resource and we need to work on three needs
####Memory Management the system has to divided between two types on how to process the the memory from
Binding and data instructions to
- Address binding of instructions and data to memory addresses can happen at three different stages known as: compile time, load time or execution time
Dynamic Linking
- With this linking, Linking postponed until execution time. where Small piece of code (stub) used to locate the appropriate memory-resident library routine
Overlays
- the memory is needed a bit it's needed to a great way at any point in time
Swapping
The memory takes a different way and the the way to start the process of with out
Memory Allocation
- The main memory must accommodate both the operating system and the various user processes. We need to allocate different parts of the main memory in the most efficient way possible. The main memory is usually divided into two partitions: one for the resident operating system, and one for the user processes. We may place the operating system in either lowmemory or high memory. The major factor affecting this decision is the location of their interrupt vector.
Two of the following is how to use memory for user processes:
-
- Contiguous memory allocation
-
- Non contiguous memory allocation
-
- Contiguous Memory Allocation all of our processes are stored in contiguous memory locations.
What is Memory compaction?
- Compact to reduce external fragmentation.
Hardware Support:
- The relocation register scheme also used to protect user processes.
Noncontiguous memory allocation
It is allowed to store the processes in Noncontiguous memory
There are different techniques used to load processes into memory, as follows:
- Paging
- Segementation
- Virtual memory paging(Demand paging) etc.
Two Major allocation Algorithm:
- Equal allocation
- Proportional allocation
Page Table
- The processes that can come from and to and from the harddrive are found here and then all have to be worked on
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.