Podcast
Questions and Answers
What is the primary role of an operating system in the context of computer system components?
What is the primary role of an operating system in the context of computer system components?
- To control and coordinate the use of hardware among various application programs for various users. (correct)
- To define the ways in which system resources are used to solve computing problems.
- To provide basic computing resources such as CPU and memory.
- To serve as the interface through which users directly interact with hardware.
Which of the following best describes the 'kernel' in the context of operating system definitions?
Which of the following best describes the 'kernel' in the context of operating system definitions?
- A set of libraries that application programs use to interface with the operating system.
- A program that manages and allocates resources.
- The core program that runs at all times, with all other programs being system or application programs. (correct)
- A program that controls the execution of user programs and I/O device operations.
In a multiprogramming batched system, how does the operating system handle a situation where a job needs to perform an I/O operation?
In a multiprogramming batched system, how does the operating system handle a situation where a job needs to perform an I/O operation?
- The operating system terminates the job and notifies the user.
- The operating system moves the job to a special I/O queue and continues processing other jobs.
- The operating system waits for the I/O operation to complete before proceeding.
- The operating system switches to another job in memory to keep the CPU busy. (correct)
Which characteristic is a key feature of time-sharing systems that distinguishes them from multiprogramming batched systems?
Which characteristic is a key feature of time-sharing systems that distinguishes them from multiprogramming batched systems?
What is the primary goal of personal computer operating systems, contrasting them with other types of operating systems?
What is the primary goal of personal computer operating systems, contrasting them with other types of operating systems?
In the context of parallel systems, what is a key characteristic of a 'tightly coupled system'?
In the context of parallel systems, what is a key characteristic of a 'tightly coupled system'?
Which of the following is a primary advantage of using a parallel system (multiprocessor system)?
Which of the following is a primary advantage of using a parallel system (multiprocessor system)?
What distinguishes a symmetric multiprocessing (SMP) system from an asymmetric multiprocessing system?
What distinguishes a symmetric multiprocessing (SMP) system from an asymmetric multiprocessing system?
In distributed systems, what does a 'loosely coupled system' primarily involve?
In distributed systems, what does a 'loosely coupled system' primarily involve?
Which of the following is a significant advantage of distributed systems?
Which of the following is a significant advantage of distributed systems?
What is the key characteristic of Peer-to-Peer (P2P) systems in the context of distributed systems?
What is the key characteristic of Peer-to-Peer (P2P) systems in the context of distributed systems?
What is a primary characteristic of clustered systems?
What is a primary characteristic of clustered systems?
What is the defining characteristic of real-time systems?
What is the defining characteristic of real-time systems?
What is the main difference between "hard" and "soft" real-time systems?
What is the main difference between "hard" and "soft" real-time systems?
In the context of computer-system architecture, what is the role of a device controller?
In the context of computer-system architecture, what is the role of a device controller?
How do I/O devices and the CPU operate in a modern computer system?
How do I/O devices and the CPU operate in a modern computer system?
What event triggers a device controller to inform the CPU that it has completed its operation?
What event triggers a device controller to inform the CPU that it has completed its operation?
Why is main memory essential for CPU operation?
Why is main memory essential for CPU operation?
What is the purpose of a disk controller in the context of storage structure?
What is the purpose of a disk controller in the context of storage structure?
How is data accessed in the storage hierarchy, and what does "caching" achieve in this hierarchy?
How is data accessed in the storage hierarchy, and what does "caching" achieve in this hierarchy?
What is the purpose of 'Dual-Mode Operation' in operating systems?
What is the purpose of 'Dual-Mode Operation' in operating systems?
In the context of dual-mode operation, what is the significance of 'privileged instructions'?
In the context of dual-mode operation, what is the significance of 'privileged instructions'?
How does an operating system typically handle I/O requests from a user program?
How does an operating system typically handle I/O requests from a user program?
What mechanisms are used by operating systems to provide memory protection?
What mechanisms are used by operating systems to provide memory protection?
How is memory protection accomplished by CPU hardware?
How is memory protection accomplished by CPU hardware?
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 is Hardware?
What is Hardware?
Providing basic computing resources such as CPU, memory, and I/O devices.
What is an Operating System's Role?
What is an Operating System's Role?
Controls and coordinates the use of hardware among various applications for multiple users.
System & Application Programs
System & Application Programs
Signup and view all the flashcards
What does a Resource Allocator do?
What does a Resource Allocator do?
Signup and view all the flashcards
What is a Control Program?
What is a Control Program?
Signup and view all the flashcards
What is the Kernel?
What is the Kernel?
Signup and view all the flashcards
Multiprogramming definition
Multiprogramming definition
Signup and view all the flashcards
Multiprogramming execution
Multiprogramming execution
Signup and view all the flashcards
OS features for Multiprogramming
OS features for Multiprogramming
Signup and view all the flashcards
Time-Sharing System
Time-Sharing System
Signup and view all the flashcards
Time-Sharing Characteristics
Time-Sharing Characteristics
Signup and view all the flashcards
Personal Computer
Personal Computer
Signup and view all the flashcards
PC Operating System Goals
PC Operating System Goals
Signup and view all the flashcards
Parallel Systems
Parallel Systems
Signup and view all the flashcards
Tightly Coupled System
Tightly Coupled System
Signup and view all the flashcards
Advantages of Parallel Systems
Advantages of Parallel Systems
Signup and view all the flashcards
Symmetric Multiprocessing
Symmetric Multiprocessing
Signup and view all the flashcards
Asymmetric Multiprocessing
Asymmetric Multiprocessing
Signup and view all the flashcards
Distributed Systems
Distributed Systems
Signup and view all the flashcards
Loosely Coupled System
Loosely Coupled System
Signup and view all the flashcards
Storage Hierarchy
Storage Hierarchy
Signup and view all the flashcards
Caching
Caching
Signup and view all the flashcards
Dual-Mode Operation
Dual-Mode Operation
Signup and view all the flashcards
Memory Protection
Memory Protection
Signup and view all the flashcards
Study Notes
- Introduction to operating systems covering topics such as what an operating system is, system architecture, system components, and memory layout
What is an Operating System?
- Acts as an intermediary between a computer user and its hardware
- Goal is to execute user programs, solve user problems and make the system convenient and efficient.
Computer System Components
- Hardware provides the basic computing resources like CPU, memory, and I/O devices
- The operating system controls and coordinates hardware use among different application programs and various users
- System and application programs define how system resources are used to solve computing problems
- Users can be people, machines, or other computers
Operating System Definitions
- Resource Allocator manages and allocates resources
- Control Program controls the execution of user programs and I/O device operations
- Kernel is the one program running at all times, with all other programs being system or application programs
Multiprogramming Batched Systems
- Multiprogramming involves keeping several jobs in main memory simultaneously
- CPU is multiplexed among them, requiring memory management and protection
- The OS picks and begins executing one job from memory
- While a job requires an I/O operation the OS switches to another job, keeping the CPU busy
- The number of jobs in memory is typically less than the number of jobs in the job pool on disk
- If there isn't enough room in memory, the system chooses which jobs get loaded in, also known as job scheduling
- The system must also decide which jobs get run at the same time, or CPU scheduling
- Having multiple programs in memory at the same time requires effectively managing the memory
- The CPU sits idle in a non-multiprogrammed system, but is always in use in a multiprogramming system
OS Features Needed for Multiprogramming
- I/O routines are supplied by the system
- Memory management allocates memory to several jobs
- Job scheduling chooses jobs ready to run from disk
- CPU scheduling chooses jobs ready to run in memory
- Includes allocation of devices and general protection
- Multiprogrammed batched systems cannot be used to interact with jobs as users are executing
- Programmers also cannot modify a program as it executes to study its behavior
Time-Sharing Systems - Interactive Computing
- Time-sharing systems utilize CPU scheduling and multiprogramming to provide a fraction of a time-shared computer to each user
- The CPU is multiplexed among jobs in memory and on disk, and only allocated to jobs in memory
- When a job requires an I/O operation, the CPU switches to another job, which keeps the CPU busy
- Jobs get swapped between memory and disk, with the disk to act as a backup in main memory
- On-line communication is provided between the user and the system
- The OS gets the next control statement from the user's keyboard and not a card reader
- It must be available for users to access data and code
Time-Sharing Systems
- Features include an on-line file system, that manages disk collections
- A mechanism for concurrent execution, involving CPU scheduling schemes
- There is also job synchronization and communication to ensure orderly execution
- A mechanism prevents deadlock, in case a job is waiting for another job forever
Personal-Computer Systems
- Personal computers are computer systems dedicated to a single user
- I/O devices include keyboards, mice, display screens and small printers
- PC operating systems were not initially multi-user or multi-tasking
- The main goal of PC Operating systems is to maximize user convenience and responsiveness instead of maximizing CPU and I/O utilization
- Examples include Microsoft Windows and Apple Macintosh
Parallel Systems
- Multiprocessor systems consists of multiple CPUs in close communication
- In tightly coupled systems, processors share memory and a clock, where communication happens through shared memory
- Advantages include increased throughput(completed processes per unit of time)
- More economical, removing the need for multiple data copies
- Faster because work is divided across processors
- They also feature increased reliability and fault tolerance by picking up work from failed processors
Parallel Systems (Symmetric Multiprocessing)
- Symmetric multiprocessing (SMP) model involves each processor running an identical copy of the operating system
- Most modern operating systems support SMP, like UNIX for Multimax computers
Parallel Systems (Asymmetric Multiprocessing)
- An asymmetric multiprocessing model involves each processor being assigned a specific task
- The master processor schedules and allocates work to slave processors
- The master handles I/O and executes only the operating system while the slave runs user programs only
- If the master fails, the entire system cannot perform I/O and the same is true if there are lost slave computations
- This model is more common in extremely large systems
Distributed Systems
- Involves distributing computation among multiple physical processors
- A loosely coupled structure describes two or more computer systems connected via a communication link
- Each processor has its own operating system and local memory
- Processors communicate using message passing over communication lines like high-speed buses or telephone lines
- Advantages of distributed systems include sharing of resources(files and printers)
- Computation can be partitioned for concurrent processing, which improves the system reliability and fault tolerance
- This is also used for communications with electronic mail, ftp etc.
Distributed Systems - Networks
- Local Area Network (LAN)
- Wide Area Network (WAN)
- Metropolitan Area Network (MAN)
Distributed Systems - Client-Server Systems
- The compute-server provides an interface for clients to request services like accessing a database
- The file-server provides an interface for clients to store and retrieve files
Distributed Systems - Peer-to-Peer (P2P)
- P2P systems do not distinguish between clients and servers
- All nodes are considered equals and can act as both client and server
- Nodes can join the network by registering with a central lookup service or broadcasting requests via a discovery protocol
- Napster and Gnutella represent examples of this
Clustered Systems
- Consists of multiple systems working together like multiprocessor systems
- Storage is usually shared via a storage-area network (SAN)
- Provides high-availability through asymmetric(one machine is hot-standby) or symmetric clustering(multiple nodes running applications, monitoring each other)
- Some clusters are used for high-performance computing (HPC), requiring applications to be written with parallelism in mind
Real-Time Systems
- Real-time systems are characterized by the need to supply immediate responses, particularly when sensors bring data
- They are often used as a control device in scientific experiments, medical imaging, industrial control systems, etc.
- Such systems typically have well-defined, fixed-time constraints
- Hard real-time systems have limited or no secondary storage
- Data is stored in short-term memory or read-only memory (ROM)
- These systems conflict with time-sharing systems and are not supported by general-purpose operating systems
- Soft real-time systems have limited utility in industrial control or robotics
- They can be used in multimedia applications, virtual reality requiring advanced operating-system features
Computer-System Architecture
- I/O devices and the CPU can execute concurrently
- Each device controller manages a specific device type and has a local buffer
- The CPU transfers data to and from main memory and local buffers
- Memory controller ensures orderly access to shared memory, synchronizing all shared memory accesses
- Device controllers notify the CPU upon operation completion by creating an interrupt
Storage Structure
- Main memory is a large storage medium that the CPU accesses directly for program execution
- Secondary storage is an extension of main memory, with large, non-volatile storage capacity
- Magnetic disks have rigid metal or glass platters covered with magnetic recording material
- Disk surfaces are logically divided into tracks which are then further divided into sectors
- Disk controller handles the interface between the device and computer
Magnetic Disk Mechanism
- Platters have two magnetic material-covered surfaces
- Platter diameters may range from 1.8 to 5.25 inches
- Disk drives may have thousands of cylinders organized into concentric cylinders, and each track may contain hundreds of sectors
- The transfer rate is the rate at which data flows between the drive and the computer
- Positioning time (or random access-time) consists of both the seek time and rotational latency
- Seek time is the time required to move the disk arm to the desired cylinder
- Rotational latency is the time required for the desired sector to rotate to the disk head
Memory & Storage Structure
- Floppy disks are composed of one platter and a head that sits directly on the surface
- Consisting of less storage at 1.4MB, it features slower speeds compared to hard disks, and are generally removable
- The load moves a word from main memory to an internal register for CPU execution
- The store instruction moves the content of a register to main memory
- Programs/data are generally not stored in the main memory permanently because the main memory's maximum storage is limited
- Main memory (RAM) is volatile, losing it's contents when power is turned off or lost
- Therefore, data is generally backed up in secondary storage such as disks, CDs, drives etc.
Storage Hierarchy
- Storage systems are organized based on levels
- Attributes include Speed, Cost, Size, and Volatility
- Caching involves copying information into faster storage system
- Main memory acts as a last cache for secondary storage
- CPU registers, caches, and main memory are volatile
- All storage beyond main memory is non-volatile
- Caching first checks cache memory, upon data absence it goes to main memory and assumes that there is a high probability that it will be needed again
- Data must be moved from secondary storage into main memory before being used
- Data transfer from cache to CPU and registers is a hardware function without OS control
- Data transfer from disk to memory is controlled by the operating system
- In multi-processor systems, when any shared data is held by 2+ caches, Cache Coherency and Consistency ensures that no 2 caches hold different values of the shared data simultaneously
Hardware Protection
- Dual-Mode Operation
- I/O Protection
- Memory Protection
Dual-Mode Operation
- Addresses shared resource concerns
- Ensures that an incorrect program does not impact the correct running of other programs
- Hardware supports two different modes of operation, User Mode and Monitor Mode
- User mode is execution done on behalf of a user
- Monitor mode is execution done by the operating system
- At system boot time, the hardware starts in Monitor mode; the Operating system is loaded and starts user processes in User mode
- Whenever an interrupt occurs, the hardware switches from User mode to Monitor mode
- Whenever the O.S. gains control of the computer, it is in Monitor mode
- MS-DOS for 8088 architecture does not have a dual mode and can be wiped over or written down
- MS-Widows NT and IBM OS/2 take advantage of dual mode feature and provide greater protection for the O.S
- A mode bit is added to the computer hardware to indicate the current mode: monitor (0) or user (1)
- When either an interrupt or fault occurs, the hardware switches to monitor mode
- Privileged instructions can only be issued in monitor mode
I/O Protection
- All I/O instructions are privileged instructions of monitor mode
- This ensures that a user program cannot gain control of the computer in monitor
System Call to Perform I/O
- Only the operating system can process I/O instructions and operations
- A user program executes the system call to request the operating system perform I/O
Memory Protection
- The operating system and user programs must have memory protected from each other
- In order to have memory protection, two registers can be added to define a range of legal addresses
- The base register holds the smallest legal physical memory address of code
- The limit register contains the size of the range
- Any memory access outside of what range is protected
- This protection is accomplished by CPU hardware comparing every address generated in User mode with the registers
- The O.S. can load the base and limit registers
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.