This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Clock</title> | |
<script type="text/javascript"> | |
<!-- | |
window.onload = function() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#define MAX 5 // Số lượng tiến trình | |
#define RESOURCE_TYPES 3 // Số loại tài nguyên | |
int main() { | |
int n = 5, m = 3; // Số tiến trình và số tài nguyên | |
int P[MAX] = {0, 1, 2, 3, 4}; // Các tiến trình | |
int allocation[MAX][RESOURCE_TYPES] = { |