Skip to content

Instantly share code, notes, and snippets.

View yangzhou95's full-sized avatar

yangzhou yangzhou95

View GitHub Profile
@yangzhou95
yangzhou95 / FCFS.py
Created September 11, 2017 22:08 — forked from tanayseven/FCFS.py
FCFS (First Come First Serve) Process scheduling using python
#!/usr/bin/env python
process_queue = []
total_wtime = 0
n = int(raw_input('Enter the total no of processes: '))
for i in xrange(n):
process_queue.append([])#append a list object to the list
process_queue[i].append(raw_input('Enter p_name: '))
process_queue[i].append(int(raw_input('Enter p_arrival: ')))
total_wtime += process_queue[i][1]
process_queue[i].append(int(raw_input('Enter p_bust: ')))
@yangzhou95
yangzhou95 / FCFS.py
Created September 11, 2017 22:08 — forked from tanayseven/FCFS.py
FCFS (First Come First Serve) Process scheduling using python
#!/usr/bin/env python
process_queue = []
total_wtime = 0
n = int(raw_input('Enter the total no of processes: '))
for i in xrange(n):
process_queue.append([])#append a list object to the list
process_queue[i].append(raw_input('Enter p_name: '))
process_queue[i].append(int(raw_input('Enter p_arrival: ')))
total_wtime += process_queue[i][1]
process_queue[i].append(int(raw_input('Enter p_bust: ')))