You have to write a program in c to search a phrase in a 2GB text file.It's not possible to open a file this large in Li
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You have to write a program in c to search a phrase in a 2GB text file.It's not possible to open a file this large in Li
You have to write a program in c to search a phrase in a 2GBtext file.It's not possible to open a file this large in Linux.Soyou have to use multi processing technique of c to create multipleprocesses and then assign chunks of file to each process.Theseprocesses will then act independently and seach in their assignedpart for the word.And report the address locations of the word.Andreport the address locations of the word.fork() can be used tocreate multiple processes.And mmap to map file in main memory.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!