0% found this document useful (0 votes)
246 views

CS604 Current Final Term Papers 2022

The document provides solutions to past papers for the CS604 Operating Systems final exam. It includes solutions to 12 practice exams with questions on topics like page replacement algorithms, semaphores, deadlocks, virtual memory management, and file systems. Students can contact [email protected] for any clarification on the solutions provided. Master's level experts have solved and verified all the solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
246 views

CS604 Current Final Term Papers 2022

The document provides solutions to past papers for the CS604 Operating Systems final exam. It includes solutions to 12 practice exams with questions on topics like page replacement algorithms, semaphores, deadlocks, virtual memory management, and file systems. Students can contact [email protected] for any clarification on the solutions provided. Master's level experts have solved and verified all the solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

FINAL TERM PREPARATION

PAST PAPERS 2022 SOLUTION


Operating system Cs604

SOLVED AND VERIFIED BY MASTERS


FOR ANY QUERIES FEEL FREE TO ASK
[email protected]
CS604 Final Term Preparation:
Solved and verified by Masters
Subscribe our YouTube channel for more solved papers

Paper#1
22-9-2022
Q#1: How to handle be lady’s anomaly in FIFO (3 marks)

From handouts: page 205

Q#2: Types of mount (3 marks)


Q#3: What is P & V in semaphore (3 marks) page 111

Q#4: If safe sequence is not found, what does it mean? (3


marks)

Q#5: Deadlock Prevention algorithm and safe state relation (3


marks)
Q#6: UNIX/LINUX Functional situations were given. We had to write
system calls against them. (5 marks)

Q # 7:Write 2 conditions when to invoke deadlock detection (5


marks)
Q#8: If no free frames are there. A page is replaced to make
space for desired page. Write steps of page replacement. (5
marks)

Q#9:A mailbox is used by sender S and receiver R for


communication of message with their names. Write properties
of communication channel/links. (5 marks) midterm page 47

Paper#2
19-9-2022
Mcqs Waqar ki file say
IPC kay tool five (5 marks) midterm page 48
Find the offset (5 marks)
From handouts

Find best fit and worst fit data given tha (5 marks)
Semaphore ka tha spinlock ki definition or update karna tha
given numeric ko (5 marks)

Find next fit (3 marks)


Statement di thi us may tha y name kia hay es problem ka (3
marks)
Harddisk ko improve karney kay bare main tha (3 marks)

Paper#3
19-9-2022
Mcqs mostly from Junaid file
Types of storage un ko sort kr kay likhna tha kay jho storage most
frequently used hoti hai at the top. (5 marks)
Os multiprogramming single processor kay sath kesa karta hai (5
marks) midterm

Aik pre paging ka question tha

semaphores ka question tha aik uss ko do actions ka yani wait


and signal ka syntax likhna tha.
Bounded buffer may say tha

producer form and consumer form ka code given tha. Mistakes


bataani thi.
Consumer code:

If the page-fault rate is very high. This leads to low CPU utilization. The
operating system thinks that it needs to increase the degree of
multiprogramming, because it monitors CPU utilization. Whether it
would be good to add another process or not.. give reason in either
case. (5 marks)
Paper#4
18-9-2022 CS 604
18.09.2022 (8:00 AM)
MCQ Waqar ke b or junaid ke b dunun ma say thay
mostly, 3,4 in say alg say ay Subjective mix up.
Aik semaphore ka tha,
1. Read (pfdf [1], buf -5) is trha ke equation thee batana thaa kay
properly execute ho ge ya ne.

Sender receiver wala question tha aik midterm


1. Safety algorithm say type tha aik.
2. Aik question thaa (15, 3922) on 20 byte is type ka tha k6 jis ma say
logical address maloom krna tha.

Paging and thrashing related aik question


Bake 2 question yaad ne a rahay
Overall paper asan tha agr yaad keya ho to,,
Paper#5
sept-2022
Two atomic operations of Semaphore Is disk I/O to swap
faster than the file system, justify ans

Bits required for 16 byte page size,

Frame allocation type and formulas


Paper#6
23-9-2022
23-09-2022(11 Am)
Objective
McQ from junaid file (292-296)
McQ 81, 97, 114, 177, 186, 201, 228, 280, 289,
Subjective
Q#41
Vfork() different than fork()
Q#42
Prepaging can be control by trashing?

Q#44
Part's and it's function? diagram given
Pi(circle ⭕) and Ri (rectangle) And edges
between Pi and Ri?
Q#46
Paging and segmentation (Table given with some statement
about paging and segmentation) Answer yes or no? clear
concept of segmentation and paging very important topic
Q#47
Related question about semaphore? Repeated
Q#48
Related question about throughput? mid term
Q#49
Input, output and error redirection in Unix/Linux

Q#50
Three Similarities between monitor and critical region?
Handouts page 124,125

Paper#7
21-9-2022 Cs604
Mcqs Junaid , Riz file Moazz file
1:Fork system call say related tha(193
page per answer ha is Ka ) ?

2:Safe state is necessary in deadlock


prevention?

3: differentiate Response time / turnaround time


midterm
4: explain deadlock 4 condition
5 : wait for graph banana tha resources allocation graph
ko dakh ker or batana tha Ka deadlock ha ya Nahi ?
Page 132,133
6: ak frame say resulted tha calculation Ka ?

7:define 2 schemes of efficient implementation of page


table? (170)

8:thrashing Ka tha ak (page 207 per answer ha is Ka )

Paper#8
21-9-2022
Cs604 today paper MCQS from past papers
Subjective paper:
1)shortest seek time first ki diagram bnani thi or calculate
krna tha waiting time and average time repeated
2)bounded buffer problem ko define krna tha or syntax
dia hua tha us mai mistakes check krni thi repeated
3)wait for graph bnana tha repeated
Paper#9
20-9-2022 Cs604
20.9.2022 at 5pm
40 mcq
80 prcnt from wqar file
Directories Segmentation Fragmentation
Cpu scheduler Deadlock
Short or long question
Paper#10
19-9-2022
Cs604
Subjective
Deadlock techniques
Page table
1 numerical from lectures 32

1 question related to diagram


Which technique is used in page table in the main
memory?

What operation are used in a file

What is mounting and their types Repeated


Paper#11
18-9-2022
Date: 18 September
22; Time: 11:00
I/O swap space
Semaphore wait and signal
two logics Deadlock detect and recover with two types
commands for "Read, rewind and close"

Paper#12

25-03-2022
While managing computer system hardware efficiently,
sometimes it seems reasonable to service all requests that are
close to current head position identify the technique which will
work on this policy. (3 marks)
If it is not possible to find a safe sequence after running safety
algorithm for requesting purpose. What does it mean? (3
marks)

Paper#13
10 sept 20202 Cs604..Current Final ppr
11 mcqs moaz r waqar file mn sy
thy..baki bhi easy thy.. 5 qs 3 mrks
k r 5 qs 5 mrks k thy

1. preepmtive kesy use hota hy deadlock situation men.

3. access and classes btani thi unix ki.

4 . ik r numerical tha us men logical address find krn tha.


5. ik directory di hoi thi r btana tha k is sy commnd dety
hen Long
shortest Remaining Time First waly topic mn sy
numerical type aya tha... midterm
ariving time r burst time dia hoa tha...wating time r us ki
avrg find krni thi with gantt char.
monitor r critical section ki 3 smiralities btani then..
repeat
2 schemes btani thhen..
page table ko easy bnany k lea.
deadlock avoidace mn safe sequence pta krna zaruri
hota hy ya nai.
Yes its important to find safe sequence otherwise there
will be a deadlock
ik r tha k pages full hen r page fault bhi zaida hen...to r
pages add krny sy ki throutput increase hoga CPU ka?
No throughput will decrease.

Paper#14
3 sept 2022
cs604 9:30 3 sep
How process share memory in segments

Producer consumer ka code tha missing fill krna tha


(imp) repeat
two method name in deadlock recovery

types of access in Unix and classes in Unix promisson


long
nanosec m value di hoi the t effective find krna tha
how to we can improve the cpu utilization
parameters deay thy un me s batana tha k kis improve
kea ja sakhta justify krna tha
deadlock four conditions Batani the
or mcqs kuch 4 5 past s thy bki handouts s
Paper#15
6 sept 2021
16 MCQS All From Past (Waqar,arsalan,junaid)
Q17:overlays problem
Q18:Deadlock recovery
Q19:Semaphore registers
Q20:modes of access and types of classes in unix
In Unix, there are two main modes of access control for files and
directories:

User-based access control: This mode of access control allows the


owner of a file or directory to specify which other users can access it
and in what way. The owner of a file can specify access permissions for
three types of users: the owner themselves, members of their group,
and all other users.

Role-based access control: This mode of access control allows the


system administrator to specify which users can access specific files or
directories based on their role within the organization. For example, an
administrator may define roles such as "managers", "developers", and
"administrators" and then specify which files and directories each role
can access.
Q21:Find Logical address and Page offset (numerical)
To find the page number and page offset from a given logical address,
the following steps can be taken:

Determine the page size: This is the size of the page in bytes. It is
typically a power of 2 and is specified by the operating system.

Split the logical address into two parts: The most significant bits
represent the page number, while the least significant bits represent the
page offset.

Calculate the page number: To do this, take the most significant bits of
the logical address and convert them to a decimal number. This decimal
number represents the index of the page in the page table.

Calculate the page offset: To do this, take the least significant bits of the
logical address and convert them to a decimal number. This decimal
number represents the offset within the page.

For example, let's say we have a system with a page size of 4KB (4096
bytes) and a logical address of 0x12345678. To find the page number
and page offset, we would follow these steps:

Page size = 4096 bytes


Logical address = 0x12345678
Page number = 0x12345000 (most significant 20 bits, or 5 hex digits)
Page offset = 0x678 (least significant 12 bits, or 3 hex digits)
Therefore, the page number is 0x12345000 and the page offset is
0x678.Q22:Detail note on semaphore
Paper#16
6 sept 2021
Share information with segment strategy
Deadlock cycle no permission say related tha aik short (3
marks)
Long 2 aye thay aik diagram thi jis ki coordination batani
thi. Aur dushra Linux ka copy or write batana tha.

Paper#17
6 sept 2021
Source code to executable code steps
File protection
UNIX/LINUX may virtual memory ka concept, esa kuch
question tha
Page replacement (algorithms)
Paged segmentation
Logical to physical address translations(steps)
Deadlock prevention me safe state essential hai ya nahi
Ek table me values thi uss may say average wait time or
first come first serve algorithm say calculation karni thi.
Values di hoi thi uska gant chart banana tha.
Segmentation kay 2 registers kay name.
Paper#18
1 sept 2021
80% MCQS from past moaz file Name of three deadlock
method Access class mode user
Long 3 Similarities Critical region and monitoring region?
Enlist Bits of protection?
Paper#19
31 august 2021
Virtual memory is extremely large than main memory.
It’s yes it not justify your answer.

Table of Page and segment. Answer with yes or not.


If the five philosopher are hungry at the same time and
they have chopstick in his or her left hand to write the
techniques that the philosopher Ray the dinner without
any deadlock condition occur. Write at least three
quotations.

Deadlock avoidance.

Paper#20
Kinds of semaphores

Primitives are defined as:


Send(A, message) – send a message to mailbox A.
Receive(B, message) – receive a message from mailbox
B.

Linux, Unix Commands for rewind, read and close.

If HR is hit ratio and MR is miss ratio, the effective


access time is given by the following equation Teffective
= HR (TTLB + Tmem) + MR (TTLB + 2Tmem)

Paging ka ek table tha wo fill karna tha.


Paper#21
Q1: Consider the following programming techniques and data structures. In demand paged
environment, which of the following is/are good or bad?
1. Stack
2. Hash table
3 Sequential search
Suppose there's a deadlock occurs in the system and a deadlock detection algorithm detects a deadlock
then how these deadlocks will be recovered? Mention any two method names.

Stack: In a demand paged environment, using a stack to allocate and deallocate memory is generally a good choice. This is
because the stack is a Last-In-First-Out (LIFO) data structure, which allows for efficient memory allocation and
deallocation. When a new page is needed, it can be easily added to the top of the stack, and when a page is no longer
needed, it can be quickly removed from the top of the stack.
Hash table: In a demand paged environment, using a hash table can be both good and bad. On the one hand, hash tables
provide fast lookup times, which can be beneficial in reducing the amount of page faults. However, hash tables can also be
memory intensive, as they require a significant amount of memory to store the hash table itself and the linked lists that may
be needed to handle collisions. Therefore, the effectiveness of using a hash table in a demand paged environment depends
on the specific implementation and the size of the hash table.
Sequential search: In a demand paged environment, using sequential search is generally a bad choice. This is because
sequential search involves searching through each element of a data structure until the desired element is found. This can
be a slow and inefficient process, particularly if the data structure is large. In a demand paged environment, page faults can
occur frequently, and a slow search algorithm can exacerbate the problem by increasing the time it takes to access the
needed pages. Therefore, using a more efficient search algorithm, such as binary search, is typically a better choice.

Q2: Consider a scenario of demand paging system with the following utilizations:
CPU = 10 %
A.
Paging disk = 95%
B.
Other I/O devices = 3%
C.
You are required to identify the situation of system by considering the above parameters and which of the
following parameter will contribute to improve CPU utilization? Justify them. .
1. Install a faster CPU
2. Introduce page replacement algorithms
3. Increase degree of multiprogramming
4. Increase hard disk storage
5. Decrease degree of multiprogramming
6. Install more main memory
To improve CPU utilization in this scenario, one possible solution would be to increase the amount of main memory
available to the system. By doing so, the frequency of page faults would decrease, and the system would spend less time
swapping pages in and out of memory. This would lead to faster access times for the CPU, which would result in a higher
CPU utilization. Therefore, option 6 (install more main memory) is the parameter that would contribute to improving CPU
utilization in this scenario.

Option 1 (install a faster CPU) would not necessarily improve CPU utilization, as the system is already experiencing a low
load on the CPU. Increasing the speed of the CPU would not necessarily speed up page operations.
Option 2 (introduce page replacement algorithms) could help to reduce the frequency of page faults, but it would not
necessarily improve CPU utilization.
Option 3 (increase degree of multiprogramming) could potentially improve CPU utilization by allowing the system to run
more processes simultaneously, but it would not necessarily address the underlying issue of frequent page faults.
Option 4 (increase hard disk storage) would not necessarily improve CPU utilization, as the system is already experiencing a
high load on the paging disk. Adding more storage would not necessarily speed up page operations.
Option 5 (decrease degree of multiprogramming) could potentially reduce the load on the system, but it would also reduce
the amount of work the system can do at any given time, and it would not necessarily address the underlying issue of
frequent page faults.

Q:3 Consider a swapping system in which memory consists of the following hole sizes in memory
order: 10KB, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB, and 15 KB. Which holes is taken for
successive segment requests of: (a) 12 KB (b) 10 KB (c) 9 KB For best fit and worst fit?

We can solve this problem using the best fit and worst fit memory allocation algorithms.
Best fit: 9KB , 10KB, 12KB
Worst Fit: 12KB, 10KB, 9KB

Q:4 You have studied the concepts of semaphore in details. Answer the following questions. Classify the
semaphores into at least two categories based on waiting behavior. And when a specific semaphore is
more useful as compared to other.

Semaphores can be classified into two categories based on their waiting behavior:
Blocking semaphores: A blocking semaphore, also known as a binary semaphore, blocks the calling process until the
semaphore is available. If the semaphore is not available, the process is put into a waiting queue until it becomes available.
Once the semaphore is released, one waiting process is allowed to proceed.
Non-blocking semaphores: A non-blocking semaphore, also known as a counting semaphore, does not block the calling
process if the semaphore is not available. Instead, the process simply returns an error code and continues executing. Non-
blocking semaphores are typically used for synchronization between processes or threads.
When a specific semaphore is more useful than the other depends on the specific use case. Blocking semaphores are
typically used in situations where mutual exclusion is required, such as protecting a critical section of code from concurrent
access by multiple processes or threads. Non-blocking semaphores, on the other hand, are typically used in situations
where multiple processes or threads need to access a shared resource concurrently, and a blocking semaphore would
cause unnecessary delays and reduce performance .In general, blocking semaphores are more useful when there is a need
for mutual exclusion, and non-blocking semaphores are more useful when there is a need for coordination and
synchronization between multiple processes or threads.
Q:5 Consider the following table for 2 resources and 4 processes. Identify whether system is in safe state
or not? If yes then determine the safe sequence from given information.
Current Allocation Max Available Need
A B A B A B A B
P0 2 0 2 4 2 7 0 4
P1 3 2 9 2 6 0
P2 1 1 4 1 3 0
P3 1 2 6 4 5 2

In Linux operating system, you are required to write down the working of copy on write technique with
respect to virtual memory.
We can use the banker's algorithm to determine whether the system is in a safe state.
First, we calculate the total resources available in the system by adding up the current allocation and the available
resources.
A=2+3+1+1=7
B=0+2+1+2=5
Using the banker's algorithm, we can see that the system is in a safe state and the safe sequence is P1, P3, P2, P0.
Copy on write (COW) is a technique used in virtual memory to conserve memory by sharing pages of memory
between processes. In COW, when a process requests a new page of memory, the operating system creates a copy of
the page, but the copy is not immediately created. Instead, the page is marked as read-only and shared between the
requesting process and the original process that owns the page.

Q: 6In dining philosopher problem, assume that all five philosophers get hungry at the same then all
will pick up their right chopstick and everyone will be waiting for his/her left chopstick. In that case, no
one will get the left chopstick and they will get starve. This problem will create deadlock situation.
Many remedies have been suggested to resolve this deadlock problem. You are required to give at least
three solutions for such type of problem.
Here are three possible solutions to avoid deadlock in the dining philosopher problem:
1. Resource hierarchy solution: Assign an order or priority to the chopsticks, such as a numbering system or
a hierarchy based on the seating arrangement. Each philosopher must pick up the lower-numbered
chopstick first before picking up the higher-numbered chopstick. This eliminates the possibility of a
circular wait and guarantees that the resources will be allocated in an orderly fashion.
2. One chopstick as shared resource: Instead of each philosopher holding two chopsticks, allow the
philosophers to share a common chopstick between two adjacent philosophers. This solution eliminates
the possibility of circular wait as no two adjacent philosophers can pick the common chopstick at the
same time.
3. Timeout solution: Set a timer for each philosopher while waiting for the chopstick. If a philosopher
cannot acquire both chopsticks within a specified time, they release the chopsticks and return to
thinking state. This ensures that no philosopher starves and all get an equal opportunity to eat.

Q:7 Consider a scenario when a process does not have adequate pages because the page-fault rate is very
high. This situation leads to low CPU utilization. Will CPU utilization decreases due to high page fault rate?
Justify your answer

CPU utilization can decrease due to a high page fault rate because when a process requires a page that is not present in
physical memory, a page fault occurs. The operating system then has to load the required page from the disk into physical
memory, and the process has to wait until the page is loaded. This waiting time reduces the CPU utilization because the
CPU is not executing any instructions during this time.
If the page-fault rate is very high, it means that the process is experiencing a large number of page faults, which translates
to a longer waiting time for the required pages to be loaded. As a result, the CPU has to wait for a longer time for the
process to resume execution, leading to a decrease in CPU utilization.

Q8: Name three schemes that allow efficient implementation of page table?
There are several schemes that can be used to efficiently implement page tables in operating systems. Three of the most
commonly used schemes are:
1. Hierarchical Page Tables: In hierarchical page tables, the page table is divided into multiple levels, with each level
having a smaller size than the previous level. Each level of the page table contains a page directory or page table, and
the page directory or table entries point to the next level of the page table. This scheme is efficient because it allows the
page table to be stored in a smaller space and requires fewer memory accesses to find a page table entry.

2. Inverted Page Tables: In inverted page tables, instead of having a page table for each process, a single page table is
used for all processes in the system. The page table contains entries for each physical page frame, and each entry
contains information about the process that owns the page frame and the virtual address range mapped to the page
frame. This scheme is efficient because it reduces the amount of memory required to store page tables and reduces the
time required to search for a page table entry.

3. Multi-level Page Tables: Multi-level page tables are similar to hierarchical page tables, but they use multiple levels of
page tables of the same size. Each page table entry points to another page table, and the last level of the page table
points to the physical page frame. This scheme is efficient because it allows the page table to be divided into smaller
tables, which reduces the amount of memory required to store the page table and speeds up the search for a page table
entry.
Paper#22
You are required to identify the problems in case of following three
piece of code.

P0 P1
signal(S); wait(S);
... ...
wait(S); signal(S);
... ...

b)
P0 P1
wait(S); wait(Q);
wait(Q); wait(S);
... . ..
signal(S); signal(Q);
signal(Q); signal(S);

c)
P0 P1
wait(S); wait(S);
... ...
wait(S); signal(S);
... ...
If it is not possible to find a safe sequence after running the safety
algorithm for a requesting process then what does it means?
a) There is a potential deadlock situation. If P0 executes the signal(S)
operation before P1 executes the wait(S) operation, then P1 will be
blocked indefinitely. Similarly, if P1 executes the wait(S) operation
before P0 executes the signal(S) operation, then P0 will be blocked
indefinitely.
b) There is a potential deadlock situation. If P0 executes the wait(S)
operation before P1 executes the wait(Q) operation, and P1 executes
the wait(S) operation before P0 executes the wait(Q) operation, then
both processes will be blocked indefinitely. This is known as a circular
wait condition.
c) This code segment does not have any apparent problems as it
involves mutual exclusion. The wait() and signal() operations are in the
correct order and there is no potential for deadlock. However, the
exact context of this code segment should be analyzed to ensure that
it is being used correctly.
It means system is not in stable. This system will not end as a safe
system and there will be deadlock.
Let us consider a page size of 16 bytes and process address space of
32 pages and physical address space of 64 frames. Calculate the
following.
a) Number of bits needed for ‘p’.
b) Number of bits needed for ‘f’.
c) Number of bits needed for ‘d’.
Consider a system with 4 processes and 4 resources with single
instance of each resource type. Given below is the Resource Allocation
graph. You are required to construct wait-for graph from Resource
Allocation graph and find out whether the deadlock exists or not?

To construct the wait-for graph from the resource allocation


graph, we start by drawing a node for each process and resource
in the system. We then draw edges between nodes to represent
requests and allocations of resources. The resulting wait-for
graph is:
To determine whether a deadlock exists, we look for cycles in
the wait-for graph. If there is a cycle, then there is a circular
wait and a deadlock exists.
In this case, we can see that there is a cycle in the wait-for
graph: P1 → R2 → P3 → R1 → P1. This cycle represents a
circular wait, where each process is waiting for a resource that
is held by another process in the cycle. Therefore, a deadlock
exists in this system.

Q: You are required to calculate the following parameters


assuming logical address space of 8 pages of 1MB and
physical address space of 16 frames. (repeat)
No. of bits required for p
No. of bits required for f
No. of bits required for d
No. of bits required for logical address
No. of bits required for physical address
Q: You have studied the concepts of semaphore in details.
Answer the following questions. Classify the semaphores
into at least two categories based on waiting behavior. And
when a specific semaphore is more useful as compared to
other. (repeat)

Q: Describe the operations that a file owner can use


for ‘file protection’. Also mention some operations
that we can perform on a file.
Ans: File protection refers to the various methods used to limit
access to a file and protect it from unauthorized modification
or deletion. The specific operations available for file protection
may depend on the operating system and the file system in
use, but some common operations that a file owner can use
for file protection are:
1. Changing file permissions: File owners can change the
permissions of a file to control who can access it and what
actions they can perform on it. File permissions typically
include read, write, and execute permissions for the owner,
group, and other users.
2. Setting ownership: File owners can set the ownership of a
file to control who has administrative control over it. By
default, the owner of a file is the user who created it.
3. Setting access control lists (ACLs): Access control lists are
more fine-grained than traditional Unix-style permissions,
allowing file owners to specify access permissions for
individual users or groups.
4. Encrypting files: File owners can encrypt files to protect
their contents from unauthorized access. Encryption can be
used in conjunction with other protection measures like
access control lists.

Q. Is disk I/O to swap space generally faster than file


system? Justify the statement with valid reasons in
either case.
Disk I/O to swap space is generally faster than that to the
file system. It is faster because swap space is allocated in
much larger blocks, and file lookups and indirect
allocation methods are not used.

Q. Is it necessary to have a reference count within a file


descriptor in order to implement soft links? Justify the
answer. 3 marks
Ans: No, it is not necessary to have a reference count within a
file descriptor in order to implement soft links.
A soft link, also known as a symbolic link, is a type of file that
contains a path to another file or directory. When a user tries
to access a soft link, the operating system transparently
redirects them to the target file or directory. Soft links are
useful for creating aliases or shortcuts to files that are located
in different directories. Therefore, implementing soft links
does not require a reference count within a file descriptor. The
file system itself is responsible for managing the reference
count and ensuring that the soft link and target file remain
valid and accessible

You might also like