Abraham Silberschatz et al 7ed
The operating system provides roughly the following services:
1. User interface
2. Program execution
3. IO operation
4. File System operation
5. Communication
6. Error detection
7. Resource allocation
8. Statistics
9. Protection and safety
System calls are divided into 5 major categories:
1. Process Control
2. File Management
3. Device Management
4. Information Maintenance
5. Communication
The root cause of creating a virtual machine is that the same hardware can be shared in a parallel n different execution environment.
The JVM is an abstract computer specification that includes a class loader and a Java interpreter that executes platform-agnostic bytecode.
. The core of the NET Framework is the CLR, the common language runtime. The CLR is an implementation of a. NET virtual machine.
PCB: Process Control block
RMI is the Java implementation of RPC.
There are 2 main methods of line libraries:
1. Provide a library with no kernel support in the user space; the library function call is just a local call to the user space;
2. A kernel-level library that is directly supported by the operating system, which typically causes system calls.
Multithreading issues:
1. System call Fork () and exec ()
2. Thread cancellation is the task of terminating threads before the thread completes.
3. Signal processing. The signal is used in UNIX to notify the process that a particular event has occurred.
4. The thread pool restricts the number of concurrently executing threads in the system. The main idea of the thread pool is to create a certain number of threads at the beginning of the process and put them in the pool to wait for work. When the server receives the request, it wakes up a thread in the pool and passes the request to it for processing.
5. Thread-specific data
6. Scheduler activation
CPU scheduling is the basis of a multi-channel program operating system. FCFS first come first service, SJF shortest job priority. Priority scheduling, rotation method, multi-level queue scheduling.
Signal Volume semaphore
P:proberen Test
V:verhogen
The key to semaphores is their atomic execution.
For shared array teams, the sequential process of a group of collaborations must provide mutual exclusion. One workaround is to ensure that only one process or thread can use a critical section of code at some point.
The main disadvantage of critical area solutions is that they all need to be busy and so on. The signal volume can overcome this difficulty.
A variety of synchronization problems (limited buffer problems, read and write problems, and philosophers eating problems) are classic examples of concurrency control.
The operating system must provide mechanisms to prevent timing errors, and enhancement provides a synchronization mechanism for sharing abstract data types.
There is a producer consumer program that can practice P202
Four conditions are met at the same time, it will deadlock: mutual exclusion, possession and wait, non-preemption, cyclic wait.
Three ways to handle deadlocks: 1. Use a protocol to prevent or avoid deadlocks; 2. Allow deadlocks and then detect and recover from deadlocks; 3. Neglect, think impossible deadlock
The deadlock avoidance algorithm is less demanding than the prevention algorithm, as long as it realizes that the process uses resources.
Deadlocks are detected, some deadlock processes must be terminated, or recovered from deadlocks by preemption of some process resources. Preemption methods to consider: Choose a victim, rollback, and hunger.
With dynamic loading, a subroutine is loaded only when it is called.
The stub stub is a small piece of code that indicates how to locate the appropriate memory-resident library program.
Paging memory management allows the physical address space of a process to be non-contiguous. An important feature of paging is the separation of memory and actual physical memory from the user's perspective.
Virtual memory allows the large logical address space to be mapped to small physical memory, first it allows a great deal of process to run, and secondly, it allows the programmer to not consider memory availability. Again, allow the process to share the system library with memory.
Virtual memory is typically implemented in the form of on-demand paging.
Various page substitution algorithms. FIFO is easy to write, but has belady exceptions. The optimal page replacement algorithm requires future knowledge, and the LRU algorithm is approximate optimal.
In addition to the page replacement algorithm, the virtual memory requires a frame allocation policy.
Belady exceptions refer to some page substitution algorithms, and page error rates may increase as the number of frames allocated increases.
A file is a set of related information that is defined by the creator.
LDAP: Lightweight Directory Access Protocol.
Consistency semantics describes the semantics of multiple users accessing shared files at the same time.
The most common way to solve a protection problem is to control it according to the user's identity.
Add an access control list ACL for each file and directory
2 Roles of the virtual file system VFS Layer:
1. Separating common operations from specific implementations
2. Vnode as a unique identifier, can support network file system
There are 3 common disk space allocation methods:
1. Continuous
2. Links
3. Index.
Continuous distribution of external fragmentation issues;
Direct access to link allocation is inefficient;
Index allocation may waste a certain amount of space due to its index block
The free space allocation method includes bit vectors and linked lists. Optimization methods include composition, count, and fat
The most commonly used hash table technology for directory management programs.
Storage System performance has 3 important aspects: bandwidth, latency, and reliability.
IO hardware features are bus, device controller, and device itself.
The IO core subsystem provides IO scheduling, buffering, caching, spooling, device reservation, and error handling.
A stream is an implementation that makes device drivers reusable and easier to use.
Protection refers to a control program, process or user access to computer system resources mechanism. The most critical protection principle is the principle of least privilege.
The protection model can be abstracted as a matrix, called an Access matrix. The matrix is either implemented as a series of access lists associated to each object. is either implemented as a list of permissions that are associated to each domain.
A code snippet that misuses its own environment is called a Trojan horse.
Worm-worm is a process that exploits the reproductive spawn mechanism to disrupt system performance.