Can't access a partition that was locked by a crashed process #31

Open
opened 2024-03-09 20:07:36 +01:00 by Sweetbread · 0 comments
Owner

Current FS code works like this: lock (a mutex guarding access to) a partition, read/write data, unlock the partition.
When a thread crashes while reading/writing, the partition is left locked. Therefore other programs can't acquire the lock and access that partition anymore.

In theory, kernel could release acquired locks when threads crash. In practice, kernel has no idea what locks have been acquired by a given thread.
It is possilble to modify FS code to fill an array of acquired locks. In fact, this is very similar to an array of file descriptors.

So, resolution of this issue could be a side effect of file descriptors when they are implemented.

Additional information:
https://board.kolibrios.org/viewtopic.php?f=31&t=3397&start=150#p76785


dunkaist

Current FS code works like this: lock (a mutex guarding access to) a partition, read/write data, unlock the partition. When a thread crashes while reading/writing, the partition is left locked. Therefore other programs can't acquire the lock and access that partition anymore. In theory, kernel could release acquired locks when threads crash. In practice, kernel has no idea what locks have been acquired by a given thread. It is possilble to modify FS code to fill an array of acquired locks. In fact, this is very similar to an array of file descriptors. So, resolution of this issue could be a side effect of file descriptors when they are implemented. **Additional information**: https://board.kolibrios.org/viewtopic.php?f=31&t=3397&start=150#p76785 --- *dunkaist*
Sweetbread added the
Priority
Medium
Reviewed
Confirmed
FASM
FS
Kernel
labels 2024-03-09 20:07:46 +01:00
Sweetbread added this to the 0.9.0.0 milestone 2024-03-10 20:18:43 +01:00
Sweetbread added the
Category/Kernel
label 2024-03-10 21:49:06 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#31
No description provided.