Operating Systems: Crash Course Computer Science #18
Introduction to Operating Systems
This section introduces the concept of operating systems and their role in managing computer programs and hardware peripherals.
What are Operating Systems?
- Operating systems (OS'es) are programs that run and manage other programs.
- They are typically the first program to start when a computer is turned on.
- OS'es handle the loading and launching of subsequent programs.
Evolution of Operating Systems
- In the 1940s and early 50s, computers ran one program at a time, manually loaded by computer operators.
- As computers became faster, running programs manually became inefficient.
- The need for self-operating computers led to the development of operating systems in the 1950s.
Batch Processing
- Early operating systems introduced batch processing, allowing computers to automatically load and run multiple programs without human intervention.
- This eliminated downtime between program executions.
Challenges with Hardware Configurations
- With the increasing popularity of computers, programmers faced challenges in writing code for different hardware configurations.
- Interfacing with peripherals required low-level knowledge of each device's hardware details.
- Programmers often lacked access to every model of a peripheral for testing purposes.
Role of Operating Systems as Intermediaries
- Operating systems acted as intermediaries between software programs and hardware peripherals.
- They provided standardized mechanisms called device drivers to facilitate communication with input/output (I/O) devices.
- Device drivers abstracted low-level details, making it easier for programmers to interact with common I/O hardware.
Atlas Supervisor: Multi-programming OS
This section explores the Atlas Supervisor, an early multi-programming operating system that allowed simultaneous execution of multiple programs on a single CPU.
Maximizing Computer Utilization
- The University of Manchester developed Atlas Supervisor for their supercomputer called Atlas in the late 1950s.
- Atlas Supervisor aimed to maximize computer utilization by automatically loading and running programs.
- It introduced clever scheduling techniques to handle program execution.
Sleep and Wake Mechanism
- When a program encountered an I/O operation that would take a while, the Atlas Supervisor put it to sleep.
- While the program was asleep, another ready-to-run program would be selected and executed.
- Once the I/O operation completed, the sleeping program would be marked as ready to run again.
Simultaneous Program Execution
- The Atlas computer was equipped with multiple paper tape readers, punches, and magnetic tape drives.
- This allowed several programs to be in progress simultaneously on a single CPU.
- Each program shared time on the CPU based on scheduling decisions made by the Atlas Supervisor.
Summary
This section summarizes the key points discussed in the transcript regarding operating systems and their evolution.
Key Points
- Operating systems are programs that manage other programs and hardware peripherals.
- Early operating systems introduced batch processing to automate program loading and execution.
- Operating systems acted as intermediaries between software programs and hardware devices through device drivers.
- The Atlas Supervisor was an early multi-programming operating system that allowed simultaneous execution of multiple programs on a single CPU.
Additional Resources
For more information about operating systems, you can refer to the following resources:
- Operating System Concepts (book)
Memory Allocation and Virtualization
This section discusses memory allocation in computers and the concept of virtual memory.
Memory Allocation
- Programs are allocated memory addresses by the operating system.
- Each program is assigned a block of memory addresses.
- The operating system decides if it can grant a program's request for more memory.
Non-Sequential Memory Allocation
- Programs may be allocated non-sequential blocks of memory.
- This can be confusing for programmers to keep track of.
Virtualization of Memory Locations
- Operating systems virtualize memory locations to hide the complexity from programs.
- Programs assume their memory starts at address 0, while the actual physical location is abstracted by the OS.
- Virtual-to-physical memory remapping is handled automatically by the OS and CPU.
Dynamic Memory Allocation
- Virtualization allows programs to have flexible memory sizes that appear continuous to them.
- Program A may have multiple non-contiguous blocks of memory, but it perceives it as a continuous block.
Memory Protection and Multics
This section explores the concepts of memory protection and introduces Multics, an influential early time-sharing operating system.
Memory Protection
- Allocating each program its own memory isolates them from one another.
- If a program goes awry, it can only affect its own allocated memory, not that of other programs.
- This feature is called "Memory Protection" and helps protect against malicious software like viruses.
Introduction to Multics
- Multics was an early time-sharing operating system released in 1969.
- It offered simultaneous interactive access for multiple users through terminals connected to a main computer.
Time-Sharing Operating Systems
- Time-sharing allows multiple users to utilize a small fraction of a computer's resources simultaneously.
- Operating systems were developed with time-sharing capabilities to prevent one user from monopolizing resources.
Multics' Security Features
- Multics was designed to be secure from the outset.
- It aimed to prevent unauthorized access to data and protect against mischievous users.
- However, Multics was considered over-engineered and complicated for its time.
Unix: Separating Kernel and Tools
This section introduces Unix, a lean operating system developed by Dennis Ritchie and Ken Thompson. It discusses the separation of the kernel and bundled tools.
Introduction to Unix
- Unix is an operating system developed by Dennis Ritchie and Ken Thompson.
- They wanted to separate the OS into two parts: the kernel and bundled tools.
Kernel Functionality
- The kernel handles core functionality such as memory management, multitasking, and I/O operations.
Bundled Tools
- Unix includes a wide array of useful tools that are not part of the kernel.
- These tools include programs and libraries that enhance the functionality of the operating system.
New Section
This section discusses the origins of kernel panics and the simplicity of Unix, which made it popular in the 1970s and 80s.
Origins of Kernel Panics
- Kernel panics occur when the kernel crashes and has no way to recover.
- The term "panic" comes from a function called "panic" that is called when the kernel crashes.
- Originally, the function would print the word "panic" and enter an infinite loop.
Popularity of Unix
- Unix could be run on cheaper and more diverse hardware, making it popular inside Bell Labs.
- As more developers started using Unix, the number of contributed tools grew.
- It gained compilers for different programming languages and even a word processor.
- Unix became one of the most popular operating systems in the 1970s and 80s.
New Section
This section discusses the rise of personal computers and simpler operating systems like MS-DOS.
Rise of Personal Computers
- By the early 1980s, basic computers became affordable for individuals.
- These personal or home computers were simpler than mainframes found at universities and corporations.
MS-DOS
- Microsoft's Disk Operating System (MS-DOS) was just 160 kilobytes in size.
- Despite lacking multitasking and protected memory, MS-DOS became popular for early home computers.
New Section
This section highlights how early operating systems lacked strong memory protection, leading to frequent crashes.
Lack of Memory Protection
- Early operating systems like MS-DOS lacked strong memory protection.
- Programs could regularly crash the system without consequences.
Blue Screen of Death
- When programs misbehaved on Windows, users would encounter a blue screen of death.
- The blue screen indicated that a program had crashed so badly that it took down the entire operating system.
New Section
This section discusses modern operating systems and their ability to multitask and have protected memory.
Modern Operating Systems
- Today, computers run modern operating systems like Mac OS X, Windows 10, Linux, iOS, and Android.
- These operating systems have multitasking and virtual and protected memory.
- Users can run multiple programs simultaneously, such as watching YouTube, editing photos, playing music, etc.
New Section
This section mentions the importance of research and development on operating systems for enabling multitasking and the role of proper memory storage.
Importance of Research and Development
- Decades of research and development on operating systems enabled multitasking capabilities.
- Proper memory storage is crucial for running multiple programs simultaneously.
New Section
This section introduces Hover as a service for buying and managing domain names.
Hover - Domain Name Service
- Hover is a service that helps users buy and manage domain names.
- It offers over 400 domain extensions including .com and .net.
- Users can get unique domains that are more professional than generic addresses.
- Custom email forwarding to existing email addresses (Outlook or Gmail) is also available.