1/30
Chapter 1 and 2
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Memory
RAM (Random Access)
Computer’s temporary workspace
Volatile
SSD/Storage
Long-term storage
Stores programs/files
Nonvolatile
Operating System Services
User Interface
CLI, Touch screen, GUI
Program Execution
Loads a program into memory and run that program, end execution, either
normally or abnormally (indicating error)
I/O Device
A running program may require I/O, which may involve a file or an I/O device
Resource Allocation
Main Memory
Only large storage media that the CPU can access directly
CPU
The primary component that executes instructions and processes information
Performs instructions such as:
Add numbers
Compare values
Move data
Load value from memory
CPU Time
The amount of time a CPU spends processing instructions for a given task or operation.
I/O Devices
Hardware that allows the computer to receive information from or send information to the outside world
Example Input:
Keyboard
Mouse
Touch screen
Example Output:
Monitor
Speakers
Printer
Example Input and Output:
Touch screen on a phone
Multi-tasking
The OS switching between multiple process very quickly by giving each process little CPU time to make it seem like each process is happening at the same time
Multi-programming
The technique of keeping multiple programs in memory so the CPU can switch to another one when the current one can’t continue using the CPU
Example:
Task A: running but then needs to read from the disk
Task B: uses CPU while Task A is reading
User-mode
Normal programs that have restricted access to the computer
Has to ask the OS to do things for it
Kernel mode
Privileged mode where there’s access to protected hardware/system resouces
Trees in OS
Stores a hierarchical structure like the file system
Linked list in OS
If the kernel manages many processes and needs to remove one without shifting the entire list or adding a node without shifting the list
Bitmap in OS
Stores a lot of on/off information so could be used by the kernel to determine which memory blocks are available
Hashmap in OS
Used to find a process quickly to get information
Operating System (OS)
A program that acts as an intermediary between a user and the computer hardware
Controls and coordinates use of hardware among various applications and users
Parts:
Kernel
System Utilities
User interface
Memory Management
Keeping track of which parts of memory are currently being used and by whom
Deciding which processes and data to move into and out of memory
Allocating and deallocating memory space as needed
Device Management
Assigns hardware devices (like printers or disk drives) to active processes when requested and safely releases them when tasks finish
System calls:
request device, release device
get device attributes, set device attributes
logically attach or detach devices
Kernel
It is the core component of an operating system that manages system resources and allows communication between hardware and software.
Manages things like:
Who gets CPU time
Who gets RAM and where
Starting, stopping, and managing processes
File systems
System calls
Security
File Management
Process Management
Security and Protection
Interrupts
To signify that operations have been completed and to tell the CPU that
other parts of the operating system need attention.
Examples:
Pressing a key on the keyboard
Clicking the mouse
Timers that interrupt processes to give another process CPU time
Example of services provided to users/programs by OS
System calls
A controlled way for a user-mode program to request a service from the kernel
Examples:
Creating/terminating processes
Opening/Reading files
Requesting memory
Tightly coupled
Core components of OS are interdependent on other components and are in one address space
Changes to one part could impact other parts
Loosely coupled system
OS design relied on autonomous, modular components that interact through well-defined communication interfaces
Slower but easier to debug
Monolithic kernel
Kernel has little or no structure, such as layers and modules
Very fast because all components are in same address space
The kernel functionality is placed in a single static binary file in a single address space
Provides the file system, CPU scheduling, memory management, and other operating-system functions
Micro kernel
Move nonessential components from the kernel into user space to make the kernel as small as possible
Communication takes place between user modules using message passing
Advantages:
Smaller kernel is easier to port to new architectures
More reliable and secure (less code is running in kernel mode)
Disadvantages:
Performance overhead of user space to kernel space
communication
Layered kernel
The operating system is divided into several layers (levels), each built on top of lower layers.
The bottom layer (layer 0), is the hardware
The highest (layer N) is the user interface
Implementation details are hidden from higher level layers
Separating mechanism from policy
What languages are preferred for OS implementation