Professional Documents
Culture Documents
Soft real-time
Limited utility in industrial control of robotics
Useful in applications (multimedia, virtual reality) requiring
advanced operating-system features.
monitor user
set user mode
Process Management
Main Memory Management
File Management
I/O System Management
Secondary Management
Networking
Protection System
Command-Interpreter System
A process has resources (CPU time, files) and attributes that must be managed.
• Disk scheduling
DEVICE MANAGEMENT
• Buffer caching system
• Generic device driver code
• Drivers for each device - translate read/write requests into disk position
commands.
FILE MANAGEMENT
Keep track of what's on secondary storage.
file == logical entity,
COMMUNICATION
• Communication system between distributed processors.
• Getting information about files/processes/etc. on a remote machine.
• Can use either a message passing or a shared memory model.
Additional functions exist not for helping the user, but rather for
ensuring efficient system operations.
• Resource allocation – allocating resources to multiple users or multiple
jobs running at the same time.
• Accounting – keep track of and record which users use how much and
what kinds of computer resources for account billing or for
accumulating usage statistics.
• Protection – ensuring that all access to system resources is controlled.
Program counter
CPU registers
Memory-management information
Accounting information
Shared data
#define BUFFER_SIZE 10
Typedef struct {
...
} item;
item buffer[BUFFER_SIZE];
int in = 0;
int out = 0;
Solution is correct, but can only use
BUFFER_SIZE-1 elements
item nextProduced;
while (1) {
while (((in + 1) % BUFFER_SIZE) == out)
; /* do nothing */
buffer[in] = nextProduced;
in = (in + 1) % BUFFER_SIZE;
}
item nextConsumed;
while (1) {
while (in == out)
; /* do nothing */
nextConsumed = buffer[out];
out = (out + 1) % BUFFER_SIZE;
}