Skip to content

Instantly share code, notes, and snippets.

View hatim-the-dark-knight's full-sized avatar
😂

Farhath Sulthana hatim-the-dark-knight

😂
View GitHub Profile
#include<stdio.h>
#include<stdlib.h>
struct rrs {
int pid, atime, btime, tempb, ctime, tatime, wtime;
short isTraversed;
};
void main () {
// SJF CPU SCHEDULING
#include<stdio.h>
struct pris {
int pid, atime, btime, ctime, wtime, tatime;
short check;
};
void main () {
// PRIORITY CPU SCHEDULING
#include<stdio.h>
struct pris {
int pid, pri, atime, btime, ctime, wtime, tatime;
short check;
};
void main () {
// FCFS SCHEDULING
#include<stdio.h>
struct process {
int pid, atime, btime, ctime, tatime, wtime;
};
int main () {
printf ("FCFS SCHEDULING\n");
DATA SEGMENT
S1 DB "HELLO$"
VC DB 00H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
DATA SEGMENT
STR DB 'AXYBCSDEF$'
SUBSTR DB 'BCS$'
LEN1 DB 0
LEN2 DB 0
MSG1 DB 10,13,'STRING IS : $'
MSG2 DB 10,13,'SUBSTRING IS : $'
MSG3 DB 10,13,'SUBSTRING IS FOUND AT POSITION : $'
POS DB -1
RTN DB '-1$'
H COPY 001000 00107A
T 000000 1E 140033 481039 100036 280030 300015 481061 3C0003 20002A 1C0039 30002D
T 002500 15 1D0036 481061 180033 4C1000 801000 601003
E 000000
H 1000 200
T 1000 11001 141033 481039 901776 921765 571765
T 2011 11110 231838 431979 891060 661849 991477
E 1000
PGM1 START 1000
- LDA ALPHA
- MUL BETA
- STA GAMMA
ALPHA WORD 2
BETA WORD 4
GAMMA RESW 1
- END 1000
//Program to implement Indexed File allocation
#include <stdio.h>
#define MAX 100
int blocks[MAX];
int indices[10];
typedef struct {
int start;
int len;
int alloc[25];