-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreceiver.hpp
More file actions
71 lines (63 loc) · 1.32 KB
/
receiver.hpp
File metadata and controls
71 lines (63 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// receiver.hpp
// testproj
//
// Created by Jared Craddock on 8/28/16.
// Copyright © 2016 Jared Craddock. All rights reserved.
//
#ifndef receiver_hpp
#define receiver_hpp
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include "dirent.h"
#include <vector>
#include <fstream>
#include "pcb.hpp"
#include <deque>
#include <ctime>
#include <unistd.h>
#include <algorithm>
#include <list>
#include "ioEvent.hpp"
class receiver
{
public:
receiver();
void version();
void date();
void directory();
void history();
void batch();
void aliasing();
int exit();
void help();
bool createPCB(int id, int memory, int pcbType);
bool deletePCB(int id);
bool block(int id);
bool unblock(int id);
void showPCB(int id);
void showAll();
void showReady();
void showBlocked();
void generateRandomPCBs(int num);
void exec();
void setMaxMemory();
void loadProcesses();
pcb *cpu;
std::deque <pcb> ready;
std::deque <pcb> blocked;
std::deque <ioEvent> eventQueue;
int maxMemory;
struct memorySystem
{
pcb pcb;
int memory;
bool inUse = false;
};
std::list<memorySystem> memLinkedList;
private:
std::vector <std::string> commandhistory;
};
#endif /* receiver_hpp */