Podcast
Questions and Answers
Which of the following is NOT a typical goal of an operating system?
Which of the following is NOT a typical goal of an operating system?
- To execute user programs efficiently
- To make the computer system convenient to use
- To maximize the complexity of user interactions (correct)
- To use computer hardware in an efficient manner
What is the role of the operating system in a computer system?
What is the role of the operating system in a computer system?
- To define the ways in which system resources are used to solve computing problems
- To provide interface for users to interact directly with hardware
- To provide basic computing resources
- To control and coordinate the use of hardware among applications and users (correct)
In the context of operating systems, what is a 'resource allocator'?
In the context of operating systems, what is a 'resource allocator'?
- A part of the system that manages all resources (correct)
- A program that prevents errors during program execution
- A device that directly connects hardware components
- An interface that users interact with to submit tasks
Which of the following best describes the 'kernel' of an operating system?
Which of the following best describes the 'kernel' of an operating system?
What is the primary function of a bootstrap program?
What is the primary function of a bootstrap program?
Which of the following statements accurately describes computer-system operation?
Which of the following statements accurately describes computer-system operation?
Why do device controllers use local buffers?
Why do device controllers use local buffers?
How does a device controller typically signal the CPU that it has finished an operation?
How does a device controller typically signal the CPU that it has finished an operation?
What is the purpose of an interrupt vector?
What is the purpose of an interrupt vector?
What is a 'trap' or 'exception' in the context of interrupts?
What is a 'trap' or 'exception' in the context of interrupts?
How does an operating system typically handle different types of interrupts?
How does an operating system typically handle different types of interrupts?
In the context of I/O operations, what is a 'system call' used for?
In the context of I/O operations, what is a 'system call' used for?
What information is typically contained within a device-status table?
What information is typically contained within a device-status table?
Why is the term 'word' used in describing computer architecture?
Why is the term 'word' used in describing computer architecture?
Which of the byte sizes is correct?
Which of the byte sizes is correct?
Why are networks an exception to the general rule of rounding off storage measurements?
Why are networks an exception to the general rule of rounding off storage measurements?
What is the key difference between main memory and secondary storage?
What is the key difference between main memory and secondary storage?
How is data organized on the surface of a hard disk?
How is data organized on the surface of a hard disk?
What is the role of a disk controller in a computer system?
What is the role of a disk controller in a computer system?
What are the key advantages of solid-state disks (SSDs) compared to hard disk drives (HDDs)?
What are the key advantages of solid-state disks (SSDs) compared to hard disk drives (HDDs)?
What is the key principle behind storage hierarchy?
What is the key principle behind storage hierarchy?
What is 'caching' in the context of memory management?
What is 'caching' in the context of memory management?
What is the role of a device driver?
What is the role of a device driver?
What is Direct Memory Access (DMA) primarily used for?
What is Direct Memory Access (DMA) primarily used for?
What is the main advantage of using DMA for data transfers?
What is the main advantage of using DMA for data transfers?
Which of the following is a key characteristic of multiprocessor systems?
Which of the following is a key characteristic of multiprocessor systems?
What is a primary advantage of multiprocessor systems?
What is a primary advantage of multiprocessor systems?
In asymmetric multiprocessing, how are tasks assigned to processors?
In asymmetric multiprocessing, how are tasks assigned to processors?
What is the main characteristic of symmetric multiprocessing?
What is the main characteristic of symmetric multiprocessing?
What is the defining characteristic of clustered systems?
What is the defining characteristic of clustered systems?
What is the purpose of a distributed lock manager (DLM) in a clustered system?
What is the purpose of a distributed lock manager (DLM) in a clustered system?
What is meant by 'high-availability' in the context of clustered systems?
What is meant by 'high-availability' in the context of clustered systems?
What is the key difference between multiprogramming and timesharing?
What is the key difference between multiprogramming and timesharing?
What is the purpose of 'job scheduling' in a multiprogramming system?
What is the purpose of 'job scheduling' in a multiprogramming system?
What is the role of 'swapping' in an operating system?
What is the role of 'swapping' in an operating system?
What is the primary benefit of virtual memory?
What is the primary benefit of virtual memory?
Dual-mode operation in an operating system is primarily used for what purpose?
Dual-mode operation in an operating system is primarily used for what purpose?
What is the significance of a 'mode bit' in the context of operating systems?
What is the significance of a 'mode bit' in the context of operating systems?
What happens when a system call is made?
What happens when a system call is made?
What is the purpose of a timer in an operating system?
What is the purpose of a timer in an operating system?
What is the role of a 'program counter' in the context of process management?
What is the role of a 'program counter' in the context of process management?
What is the key difference between a process and a program?
What is the key difference between a process and a program?
Which of the following is a responsibility of the operating system in process management?
Which of the following is a responsibility of the operating system in process management?
Flashcards
What is an Operating System?
What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer hardware.
What does "Hardware" refer to?
What does "Hardware" refer to?
Basic computing resources like CPU, memory, and I/O devices.
What is the role of the Operating System?
What is the role of the Operating System?
Controls and coordinates the use of hardware among various applications and users.
Application Programs
Application Programs
Signup and view all the flashcards
Bootstrap Program
Bootstrap Program
Signup and view all the flashcards
Computer-system Operation
Computer-system Operation
Signup and view all the flashcards
Local Buffer
Local Buffer
Signup and view all the flashcards
Interrupt
Interrupt
Signup and view all the flashcards
How is an Interrupt Handled?
How is an Interrupt Handled?
Signup and view all the flashcards
Trap or Exception
Trap or Exception
Signup and view all the flashcards
System Call
System Call
Signup and view all the flashcards
Device-Status table
Device-Status table
Signup and view all the flashcards
Bit
Bit
Signup and view all the flashcards
Byte
Byte
Signup and view all the flashcards
Word
Word
Signup and view all the flashcards
Main Memory
Main Memory
Signup and view all the flashcards
Secondary Storage
Secondary Storage
Signup and view all the flashcards
Hard Disks
Hard Disks
Signup and view all the flashcards
Tracks and Sectors
Tracks and Sectors
Signup and view all the flashcards
Disk Controller
Disk Controller
Signup and view all the flashcards
Solid-state Disks (SSDs)
Solid-state Disks (SSDs)
Signup and view all the flashcards
Storage Hierarchy
Storage Hierarchy
Signup and view all the flashcards
Caching
Caching
Signup and view all the flashcards
Device Driver
Device Driver
Signup and view all the flashcards
Direct Memory Access (DMA)
Direct Memory Access (DMA)
Signup and view all the flashcards
Multiprocessors
Multiprocessors
Signup and view all the flashcards
Symmetric Multiprocessing
Symmetric Multiprocessing
Signup and view all the flashcards
High-Availability
High-Availability
Signup and view all the flashcards
Multiprogramming
Multiprogramming
Signup and view all the flashcards
Timesharing / Multitasking
Timesharing / Multitasking
Signup and view all the flashcards
Virtual Memory
Virtual Memory
Signup and view all the flashcards
Interrupt Driven
Interrupt Driven
Signup and view all the flashcards
Dual-mode
Dual-mode
Signup and view all the flashcards
User Mode
User Mode
Signup and view all the flashcards
Kernel Mode
Kernel Mode
Signup and view all the flashcards
Process
Process
Signup and view all the flashcards
Program Counter
Program Counter
Signup and view all the flashcards
File
File
Signup and view all the flashcards
Network
Network
Signup and view all the flashcards
Virtualization
Virtualization
Signup and view all the flashcards
Open-Source
Open-Source
Signup and view all the flashcards
Study Notes
Introduction To Operating Systems
- Operating systems act as an intermediary between computer users and the computer hardware
- Operating system goals are to execute user programs, make problem-solving easier, make the computer system convenient to use, and utilize computer hardware efficiently.
Computer System Structure
- Computer systems comprise four components: hardware, operating system, application programs, and users.
- Hardware provides basic computing resources, including the CPU, memory, and I/O devices.
- The operating system controls and coordinates hardware use among applications and users.
- Application programs use system resources to solve computing problems for users, like word processors, compilers, web browsers, database systems, and video games.
- Users can be people, machines, or other computers.
What Operating Systems Do
- Operating systems are viewed differently depending on the perspective
- Users prioritize convenience, ease of use, and good performance, without concerning themselves much with resource utilization.
- Shared computers, like mainframes and minicomputers, must satisfy all users.
- Dedicated systems such as workstations, offer dedicated resources but still share resources with servers.
- Handheld computers have limited resources and are optimized for usability and battery life
- Embedded computers, found in devices and automobiles, may have minimal or no user interface.
Operating System Definition
- An OS is a resource allocator that manages all resources and resolves conflicts fairly and efficiently.
- An OS is a control program that prevents errors and improper computer use by controlling program execution.
- There is no universally accepted definition for an OS
- A good approximation: everything a vendor ships when you order an operating system, but this varies widely.
- The kernel is "the one program running at all times on the computer."
- Everything else is either a system program (ships with the OS) or an application program.
Computer Startup
- A bootstrap program is loaded during power-up or reboot.
- The bootstrap program is typically stored in ROM or EPROM, and referred to as firmware.
- The bootstrap program initializes the system and loads the OS kernel to begin execution.
Computer System Organization
- Computer-system operation involves one or more CPUs and device controllers connected via a common bus, providing shared memory access.
- CPUs and devices execute concurrently, competing for memory cycles.
Computer System Operation Details
- I/O devices and the CPU can execute concurrently.
- Each device controller manages a specific device type and has a local buffer.
- The CPU moves data to and from main memory and local buffers.
- I/O transfers data from the device to the local buffer of the controller.
- A device controller signals the CPU upon completion of an operation via an interrupt.
Common Functions of Interrupts
- Interrupts transfer control to an interrupt service routine through the interrupt vector, which contains the addresses of all service routines.
- The interrupt architecture saves the address of the interrupted instruction
- A trap or exception is a software-generated interrupt triggered by an error or user request.
- Operating systems are interrupt-driven.
Interrupt Handling
- The operating system preserves the CPU state by storing registers and the program counter when handling interrupts.
- It determines the type of interrupt via polling or a vectored interrupt system.
- Separate code segments dictate actions for each interrupt type.
I/O Structure
- After I/O starts, control returns to the user program only upon I/O completion.
- A wait instruction idles the CPU pending the next interrupt, or a wait loop occurs, causing memory access contention.
- Only one I/O request can be outstanding, preventing simultaneous I/O processing.
- After I/O starts, control can return to the user program without waiting for completion.
- System calls request the OS to allow the user to wait for I/O completion.
- The device-status table tracks each I/O device’s type, address, and state.
- The OS indexes the I/O device table to determine device status and modify the table entry to include an interrupt.
Storage Definitions
- The basic unit of computer storage is the bit, which can contain a 0 or a 1.
- A byte consists of 8 bits and is the smallest convenient chunk of storage.
- A word is computer architecture's native unit of data, may be one or more bytes.
- Storage includes:
- A kilobyte (KB) is 1,024 bytes.
- A megabyte (MB) is 1,024^2 bytes.
- A gigabyte (GB) is 1,024^3 bytes.
- A terabyte (TB) is 1,024^4 bytes.
- A petabyte (PB) is 1,024^5 bytes.
Storage Structure
- Main memory is the only storage medium that the CPU can access directly.
- It offers random access and is typically volatile.
- Secondary storage provides large, nonvolatile storage capacity.
- Hard disks consist of rigid metal or glass platters coated with magnetic recording material.
- The disk surface is logically divided into tracks and sectors.
- The disk controller manages the device and computer interaction.
- Solid-state disks are faster than hard disks, nonvolatile and becoming more popular
Storage Hierarchy
- Storage systems are organized in a hierarchy based on speed, cost, and volatility.
- Caching involves copying information into a faster storage system; main memory can act as a cache for secondary storage.
- Device drivers are needed for each device controller to manage I/O and provide a uniform interface between the controller and the kernel.
Caching
- Caching is a principle used at many levels in a computer for hardware, OS, software
- Information in use is copied from slower to faster storage temporarily.
- The faster storage cache is checked first for information.
- If in the cache, it is directly used
- Otherwise, data is copied to the cache and used there.
- Cache is smaller than the storage being cached
- Cache management is an important design problem, size and replacement policy decisions has to be made
Direct Memory Access Structure
- Direct Memory Access (DMA) is used for high-speed I/O devices needing to transmit information at close to memory speeds.
- The device controller transfers data blocks from buffer storage directly to main memory without CPU intervention.
- Only one interrupt is generated per block, not per byte.
Computer System Architecture
- Most systems use a single general-purpose processor and also have special-purpose processors.
- Multiprocessor systems are increasing in use and importance and are also known as parallel and tightly-coupled systems.
- Advantages of multiprocessors include increased throughput, economy of scale, and increased reliability.
- Multiprocessors are of two types: asymmetric, where each processor is assigned a specific task; and symmetric, where each processor performs all tasks.
Clustered Systems
- Clustered systems are multiple systems working together, like multiprocessor systems.
- They share storage through a storage-area network (SAN)
- These systems provide high-availability service to survive failures.
- Clusters are either asymmetric, with one machine in hot-standby mode, or symmetric, with multiple nodes running applications and monitoring each other.
- Some clusters are used for high-performance computing (HPC), which requires applications to be written for parallelization.
- Some use a distributed lock manager (DLM) to prevent conflicting operations.
Operating System Structure
- Multiprogramming (Batch system) increases efficiency when a single user cannot keep CPU and I/O devices busy all the time.
- Multiprogramming organizes code and data so the CPU always has something to execute, keeping a subset of total jobs in memory.
- One job is selected and run through job scheduling.
- If a job has to wait the OS switches to another job.
- Timesharing (multitasking) is the logical extension: the CPU switches jobs so frequently, users can interact with each job as it runs, creating interactive computing.
- A response time of < 1 second is nessecary
- With timesharing each user has at least one program executing in memory, also known as a process.
- If several jobs are ready to run at the same time CPU scheduling is used
- If processes don't fit in memory, swapping moves them in and out to run
- Virtual memory allows the execution of processes not completely in memory
Operating System Operations
- Operating systems are interrupt-driven, handling both hardware and software interrupts.
- Hardware interrupts are triggered by devices.
- Software interrupts (exceptions or traps) are triggered by software errors or requests for OS services.
- Problems like division by zero, requests for OS service, infinite loops, and processes modifying one another also trigger software interrupts.
Dual-Mode Operation
- Dual-mode operation is where the OS protects itself and other system components.
- The modes: user mode and kernel mode
- Hardware provides mode bit
- Distinguishes the mode the system runs in
- Instructions are privileged and can only be executed in kernel mode
- System calls change the processor mode to kernel returning to user when the call is completed
- CPUs are increasingly supporting multi-mode operations,
- Virtual machine manager (VMM) mode for guest Virtual Machines, for example
Transition from User to Kernel Mode
- To prevent infinite loops and resources hogging a timer is used
- A timer is set to interrupt the computer after some time period
- A counter that decrements by physical clock is kept
- The operating system set the counter
- When the counter has reached zero the system is interrupted
- Setting up has to happen prior to scheduling the process to regain control or terminate a program that exceeds alloted time
Process Management
- A process is a program in execution and a unit of work within the system.
- A program is a passive entity
- A process is an active entity
- Processes need resources like CPU, memory, I/O, files, and initialization data to accomplish tasks.
- Process termination requires the reclaim of reusable resources.
- A single-threaded process specifies location of next instruction to execute via a program counter
- Processes executes sequentially until completion
- Multi-threaded processes have one program counter per thread
- A system has many processes, with users and operating system running concurrently on one or more CPUs.
- Concurrency is enhanced by multiplexing the CPUs among processes/threads.
Process Management Activities
- Creating and deleting user and system processes.
- Suspending and resuming processes.
- Providing mechanisms for process synchronization and communication.
- Providing mechanisms for deadlock handling.
Memory Management
- To execute, a program partially or fully resides in memory, along with the data needed.
- Memory management determines the programs and data in memory.
- This includes:
- Optimizing CPU utilization
- Computer response to users
- Keeping track of memory usage
- Deciding what parts of memory are currently being used and by whom
- Deciding which processes and that data to move into and out of memory.
- Allocating and deallocating memory space as needed
Storage Management
- The OS logically and uniformly views information storage, abstracting physical properties into files and using devices to control them.
- File-system management is a key aspect.
- Includes organizing files into directories
- Implementation of access controls
- OS Storage Management activities include: creating, deleting, and manipulating files and directories; mapping files onto secondary storage; and backing up files onto stable (non-volatile) storage media.
Mass-Storage Management
- Disks are used to store data that does not fit in main memory, keeping it for a "long" period of time.
- These disks require proper management and plays a central importance
- A computer operations speed depends on Disk subsystem and its algorithms
- OS activities include, free space and storage allocation and disk scheduling
- Some tertiary storage need not be fast.
- Tertiary storage are types such as as optical and magnetic tape
- Managed by either the OS or applications
- Storage varies between WORM (write-once, read-many-times) and RW (read-write).
I/O Subsystem
- One purpose of the OS is to abstract away from the user the pecularities of specific hardware devices.
- The I/O subsystem is responsible for memory management of I/O, including buffering (storing data to temporarily to transfer), caching (storing parts of data in faster storage for performance), and spooling (overlapping output of one job with input of other jobs).
- It also manages the general device-driver interface and device drivers for specific hardware.
Protection and Security
- Protection controls access of processes or users to resources defined by the OS.
- Security defends the system against internal and external attacks, including threats: denial-of-service, worms, viruses, identity theft, theft of service.
- Systems distinguish users via user identitie; including user IDs, security IDs names, an associated number, one per user
- User IDs are associated with all files/processes to determine access controls
- A group identifier (group ID) allows a set of users to be defined and controls managed
- Associated with each process and file
- Privilege escalation allows users to change their effective ID to gain more rights.
Kernel Data Structures
- Many used are similar to standard programming data structures
- Singly and Doubly linked lists, Circular linked lists
- Binary search trees left <= right with Search performance is O(n)
- Balanced binary search tree, is O(lg n)
Kernel Data Structures Continued
- Hash function can create a hash map
- Bitmap - string of n binary digits representing the status of n items
- Linux data structures defined in include files ; linux/list.h, linux/kfifo.h, linux/rbtree.h
Computing Environments - Traditional
- Stand-alone general purpose machines
- Systems interconnect with others, specifically the Internet
- Portals provide web access to internal systems
- Network computers (thin clients) are web terminals
- Mobile computers interconnect via wireless networks
- Home systems use firewalls for internet attacks
Computing Environments - Mobile
- Handheld smartphones, tablets, etc
- What is the functional difference between them and a "traditional” laptop
- Extra feature – more OS features (GPS, gyroscope Allows new types of apps like augmented reality
- Use IEEE 802.11 wireless, or cellular data networks for connectivity
- Leaders are Apple iOS and Google Android
Computing Environments - Distributed
- Collection of separate, possibly heterogeneous, systems networked together
- Network is a communications path, TCP/IP most common
- Different networks are: Local Area Network (LAN), Wide Area Network (WAN), Metropolitan Area Network (MAN), and Personal Area Network (PAN)
- Network Operating System provides features between systems
- Communication scheme allows systems to exchange messages Illusion of a single system
Computing Environments - Client-Server
- A server that responds to requests by clients in client server computing.
- Dumb terminals supplanted by smart PCs
- The system provides an interface to client to request services (i.e., database).
- The file-server system provides interface for clients to store and retrieve files
Computing Enviroments - Peer-to-Peer
- P2P does not distinguish clients and servers and all nodes are peers.
- Nodes must joint the P2P network.
- Registers its service with central lookup service on network.
- Broadcast request for services and responses to request services via a discovery protocol
- Peer-to-Peer examples include Napster, Gnutella, and Voice over IP (VoIP)s such as Skype.
Computing Environments - Virtualization
- Allows operating systems to run applications within other OSes
- Resulting in a vast and growing industry
- Emulation used when source CPU type different from target type
- Usually the slowest method
- Computer language not compiled to native code is interepretation
- Virtualization -- OS natively compiled for CPU, running guest OSes, is also natively compiled.
- The VMMs are virtual machine managers or host OS.
Computing Environments - Virtualization cont
- Use cases involve running multiple OSes for exploration or compatibility
- Apple laptops running Mac OS X host Windows as a guest
- Developing apps for multiple OSes without having multiple systems
- QA Applications for Multiple OSes
- Operating Environments within data centres
- VMM are able able to also run natively
Computing Environments - Cloud Computing
- Delivers computing, storage, even apps as a service across a network.
- A logical extension of via virtualization uses virtualization as the base for its functionality.
- Amazon EC2 has thousands of servers, millions of virtual machines, and petabytes of storage available across the Internet, pay based on usage.
- Includes pubic, private cloud services to anyone or company willing to pay
- Hybrid cloud is one that encompasses both public and private cloud components
Cloud Computing Services
- Software as a Service (SaaS) offers applications over the Internet
- Platform Service (PaaS) stack ready for application
- Infrastructure as a Service (laaS) - services over Internet for backup
- Cloud computing environments traditionally run OSes as well as VMMS security measures are enforced
- Internet and firewalls enforce security
- Load Balancers across Applications
Computing Environments - Real-Time Embedded Systems
- Real-time systems are a prevalent type of computing, they are built for a special purpose
- These are often limited in their purpose and use a real time OS Many special computing environments exist as well Use expanding
- These environments have well defined constraints that they must act in
Open-Source Operating Systems
- These system are available in the source code format rather than just the binary code
- Systems counter copy protection and DRM movement
- Started by free software foundation
- Examples include Linux and BSD Unix
- VMMs and exploration in OS available often in VM form, for example Oracle VM VirtualBox
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
An operating system acts as an intermediary between computer users and the hardware. It aims to execute programs, ease problem-solving, provide convenience, and efficiently use hardware. It consists of hardware, the OS, applications, and users.