Skip to content

Commit e534422

Browse files
authored
Update README.MD
1 parent 57456e6 commit e534422

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Intermediate/README.MD

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct msg_buffer {
7575
msg_id = msgget(my_key, 0666 | IPC_CREAT); //create message queue and return id
7676
message.msg_type = 1;
7777
```
78-
- Program1 snippet-Sending message in queue-[full here](Intermediate/q2a.c)
78+
- Program1 snippet-Sending message in queue-[full here](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q2a.c)
7979
```
8080
FILE *fd= fopen("para1.txt","r");
8181
if(!fd){
@@ -93,7 +93,7 @@ FILE *fd= fopen("para1.txt","r");
9393
//msgsnd(msg_id, &message, sizeof(message), 0); //send message
9494
printf("Sent message is : %s \n", message.msg);
9595
```
96-
- Program2 snippet -Sending the message in the queue-[full here](Intermediate/q2b.c)
96+
- Program2 snippet -Sending the message in the queue-[full here](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q2b.c)
9797
```
9898
FILE *fd= fopen("para2.txt","r");
9999
if(!fd){
@@ -111,7 +111,7 @@ FILE *fd= fopen("para2.txt","r");
111111
//msgsnd(msg_id, &message, sizeof(message), 0); //send message
112112
printf("Sent message is : %s \n", message.msg);
113113
```
114-
- Program3 snippet to recieve a message from the queue-[full here](Intermediate/q2c.c)
114+
- Program3 snippet to recieve a message from the queue-[full here](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q2c.c)
115115
```
116116
key_t my_key;
117117
int msg_id;
@@ -139,7 +139,7 @@ key_t my_key;
139139
memset(srvAdrs.sin_zero, '\0', sizeof srvAdrs.sin_zero);
140140
addr_size = sizeof srvAdrs;
141141
```
142-
- Program1 snippet to send packet to the socket-[full](Intermediate/q3a.c)
142+
- Program1 snippet to send packet to the socket-[full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q3a.c)
143143
```
144144
FILE *fd= fopen("para1.txt","r");
145145
if(!fd){
@@ -149,7 +149,7 @@ FILE *fd= fopen("para1.txt","r");
149149
if(sendto(sckid,buff,strlen(buff)+1 ,0,(struct sockaddr*)&srvAdrs,addr_size)<0)
150150
perror("Sending packets failed");
151151
```
152-
- Program2 snippet to send packet to the socket-[full](Intermediate/q3b.c)
152+
- Program2 snippet to send packet to the socket-[full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q3b.c)
153153
```
154154
FILE *fd= fopen("para2.txt","r");
155155
if(!fd){
@@ -159,7 +159,7 @@ FILE *fd= fopen("para2.txt","r");
159159
if(sendto(sckid,buff,strlen(buff)+1 ,0,(struct sockaddr*)&srvAdrs,addr_size)<0)
160160
perror("Sending packets failed");
161161
```
162-
- Program3 snippet to recieve packet from the socket:-[full](Intermediate/q3c.c)
162+
- Program3 snippet to recieve packet from the socket:-[full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q3c.c)
163163
```
164164
printf("waiting on port 8080\n");
165165
nBytes = recvfrom(sckid,buff,500,0,(struct sockaddr *)&srvSt, &addr_size);
@@ -245,14 +245,14 @@ data = buffer[*out];
245245
printf ("Writer %d writes %d to segment1\n",j, j*j+5);
246246
signal_s(semid, 0); /* signal semaphore for something used */
247247
```
248-
- [Full](Intermediate/q4.c)
248+
- [Full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q4.c)
249249
### Reader-Writer Problem with Synchronization
250250
- Write a C program that involves multiple processes/threads where one of the processes/threads is a writer while there are multiple reader processes.
251251
- You need to take care of problems related to race conditions using POSIX mutexes and semaphores. The processes may use a shared memory for 8 bytes (64-bits) that could be written to or read from.
252-
- [Full](Intermediate/q5.c)
252+
- [Full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q5.c)
253253
### Dining philosopher problem
254254
- Write a C program to solve the dining philosopher problem where the philosophers are represented by threads. You need to ensure that your solution is free of deadlocks, i.e. it should be designed such that it avoids/prevents deadlocks.
255-
- [Full](Intermediate/q6.c)
255+
- [Full](https://github.com/ashcode028/Operating-System-in-action/blob/57456e6baba4ebd508662a49eb1798210e0b638e/Intermediate/q6.c)
256256
### Deadlock avoidance
257257
- Banker's Algorithm
258258
```

0 commit comments

Comments
 (0)