10. When a process is reading/writing a memory location (e.g. a variable), can other processes read or modify the same memory location?
------>
Most of the modern operating systems use virtual memory. In virtual memory, each process gets its own virtual address space. The virtual address space is divided into two different areas namely
1.The user space and
2.The system (or Kernel) space.
----->
The system space is the same for all processes. However, it is not writeable from user mode and most of the addresses are not readable or executable from user mode.
The user mode address space is unique for each process. Address 3000 in one process is usually not the same as address 3000 in another process.
It is usually possible to create shared memory areas that can be accessed by multiple processes.
------>
When you are reading or writing an address values written by one process and when other processes try to access them , the addresses are not accessible and they start crashing. By inaccessible, those addresses have not yet been created in the process's virtual address space. Even if they were created, they would not be the same memory as in your other processes.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
10. When a process is reading/writing a memory location (e.g. a variable), can other processes read...
Python question When reading and writing into a file. Say i want to read in input using a file called input.txt and then do something. Then i want to output the results to an additional file called output.txt. i have seen ouput.out or results.out used and not .txt. What is the difference? When would you use .out and not .txt? thank you
kmalloc() Can be used by regular processes as a faster, lower-level version of malloc Allocates memory in the kernel with different priorities Only accepts allocation requests that are evenly divisible by the page size Returns the physical address of allocated memory All of the above If the kernel makes use of a userspace pointer as if it was a regular pointer, the kernel could return confidential kernel data to a process overwrite kernel data it shouldn't attempt to write to...
A program reads files from disk. It processes each file, then writes the processed file back to disk before reading and processing the next file. Assume that the reading of the file from a local disk takes 5 ms, the processing of the file takes 10 ms, and the writing of the processed file back to the local disk takes 15 ms. How long does it take the program to process 100 files from the local disk? [5 marks] a....
When a process creates a new process using the fork() operation, which of the following resources is available for read/write between the parent process and the child process? a) stack b) heap c) shared memory segments. Please explain the answer fully and also explain why the other 2 options are incorrect.
There are three cooperating processes. They all read data from
the same input device. Each process, when it gets the input device,
must read two consecutive data, only one process may access the
input device at a time (Hint: use mutual exclusion to achieve it).
Use semaphores to synchronize. Include declaration and
initialization. (SEE example on Canvas – and Video)
Answer Both 8&9
There are three cooperating processes. They all read data from the same input device. Each process, when...
1-10 true or false 1) Information literacy is an essential skill set in the process of writing. 2) In an e-mail, avoid a "subject" line that reveals the gist of your message before the reader opens it. 3) Those who read your writing will have their own confirmation bias. 4) Analyzing can be compared to reading. 5) One strategy to tell when to skim and when to pay attention to detail is to look for abstracts before you commit time...
C
Programming
12 1 point We can write a large amount text data to a file without punctuation and will be able to make sense of that data when looking at the file with notepad. True False 13 1 point a When calling the function to open a file in read mode can cause the contents of the file to be erased. True False 14 1 point Writing a struct to a binary file is similar to writing an integer...
pleasw answer as soon as possible . this is for my exam practice .
please read the code and answer the question
In a system, there are multiple reader processes which read from a shared file and multiple writer processes which update a shared file. The following variables are shared among all processes: int readCounter; semaphore mutex, writeLock; Reader and writer processes are given in the following C++-like pseudo programs: Reader Process // Non-Critical Section P(mutex); Writer Process // Non-Critical...
Systems Architecture 7--> By default, what do most file management and operating do when a user deletes a file? A) mark the storage allocation unit as free and the directory entry as unused B) overwrite all allocated storage with spaces or other null content C) Remove the entry from secondary storage D) Mark the directory entry as used 8--> Linux file access control types include________ A) read, write and change B) read, modify and list C) read, write and execute...
Question 10 (10 points) Consider a cache of 8 lines of 16 bytes each. Main memory is divided into blocks of 16 bytes each. That is, block 0 has bytes with addresses 0 through 15, and so on. Now consider a program that accesses memory in the following sequence of addresses: Loop three times: 10 through 20; 32 through 52. Once: 20 through 35. Suppose the cache is organized as direct mapped. Memory blocks 0, 8, 16 and so on...