Postagens

Mostrando postagens de junho, 2018

Assignments 3

Team 1: blocked processes in blocking_device Read and experiment phase 3 work in  http://linux-kernel-lab.blogspot.com/2018/06/blocking-device.html Make the pid of all processes blocked in blocking_device visible in /sys/show_blocked. Test it. You may run "read_test  &" as many times as you wish. Team 2: on release Read and experiment phase 3 work in  http://linux-kernel-lab.blogspot.com/2018/06/blocking-device.html When a user types in the keyboard, he constantly presses and releases key. The normal behavior is to get the character as soon as the key is pressed. If it takes sometime to release, then the key is repeated many times until it is released. Let us change its behavior. Suppress the key repetition when the user doesn't release it.  Get the character when the key is released and not pressed. Team 3: no key repetition Read and experiment phase 3 work in  http://linux-kernel-lab.blogspot.com/2018/06/blocking-device.html When a user t

Blocking device

Here goes the third assignment from 2017, Shibata' s team. It creates a blocking device. https://drive.google.com/file/d/0ByqqM2mCIz0jN1BBTjI5QW1tSTBnNDItRVN6dlluX3pzckU0/view?usp=sharing The objective is to create a blocking device: the device with major number 10. See:  https://github.com/tiagoshibata/linux/blob/086a4c6b4c1976befcb1b89900dedd0830abc80d/sys_blocking_dev/sys_blocking_dev.c When a process reads the device 10, its driver will pass some data or it will block the process in case of no data available. We are going to put data on the device 10 through a system call. Shibata's team created the system call "write device" which writes data do the device. A process may be unblocked when a write is performed. In order to test their work, they inserted busybox which provided a simple shell. In this work, we have to compile linux kernel with DEVTMPFS support. It is done by inserting  CONFIG_DEVTMPFS=y  in  ~/Downloads/pcs3746-sistemas-operacionais/1/linux/.

block and unblock process: assignment report2

I am sharing the second assignment from Shibata's team / 2017 in https://drive.google.com/file/d/0ByqqM2mCIz0jdzVMMlp4THBUd3hGdFg0TFlCOXdVbHRKek9n/view?usp=sharing In order to run: ~/Downloads/pcs3746-sistemas-operacionais/1$ docker run -ti --rm -v "$PWD/linux":/home/student/src/linux -v "$PWD/../2/initramfs":/home/student/src/initramfs tiagoshibata/pcs3746 They implemented stop_process(pid)  and continue_process(). stop_process(pid): blocks the process pid and inserts in a list Blocked_list continue_process(): make the first process of the Blocked_list ready to run. In order to test, we have 3 processes: grand_parent, parent and child. The parent process get char from the keyboard and may block itself ("b") or the child ("a"). It will unblock using "d". The parent process prints "A" and the child consecutive numbers. Using the keyboard (ex: "a"  followed by enter) you may block or unblock the parent and